govmomi icon indicating copy to clipboard operation
govmomi copied to clipboard

[BUG] OVF file uploads not using absolute path

Open Xiol opened this issue 1 year ago • 1 comments

Describe the bug Similar to #3550, the actual file uploads that Importer.Upload() attempts are done via relative paths. This results in the file not being found when the upload is attempted from a different working directory when using importer.Importer from another application.

To Reproduce Steps to reproduce the behavior:

  1. Attempt to upload an OVF using importer.Importer while having your working directory different to the OVF path.
  2. Notice that the upload fails to find some of the files.

Expected behavior The upload should happen successfully regardless of the current working directory.

Affected version v0.43.0

Screenshots/Debug Output N/A

Additional context N/A

Xiol avatar Sep 20 '24 11:09 Xiol

Howdy 🖐   Xiol ! Thank you for your interest in this project. We value your feedback and will respond soon.

If you want to contribute to this project, please make yourself familiar with the CONTRIBUTION guidelines.

github-actions[bot] avatar Sep 20 '24 11:09 github-actions[bot]

After further investigation this appears to have been caused by the FileArchive.Open() function not handling paths in a cross-platform manner (our code unfortunately targets Windows machines). I've opened another PR to resolve this.

Xiol avatar Oct 17 '24 14:10 Xiol