vmware / go-vcloud-director

Golang SDK for VMware Cloud Director
Other
80 stars 76 forks source link

Allow ISOs with UDF filesystems to be uploaded with UploadMediaImage #474

Closed rdavisunr closed 2 years ago

rdavisunr commented 2 years ago

Is your feature request related to a problem? Please describe.

When attempting to upload an ISO with a UDF filesystem, I received an error that stated: file header didn't match ISO standard

Tracked this error down to the verifyIso function in media.go which subsequently calls verifyHeader, which only allows CD001 in the header (only allowing a ISO with an ISO 9660 filesystem).

Can ISOs with UDF filesystems also be supported?

Describe the solution you'd like

Modify verifyHeader to allow UDF in addition to ISO 9660.

Describe alternatives you've considered

For now, I reverted to creating ISOs in ISO 9660 with Joliet for support of longer filenames.

Additional context

No response

vbauzys commented 2 years ago

Hi, @rdavisunr could share such a file for testing?

rdavisunr commented 2 years ago

@vbauzysvmware - sure, ISO is in the attached zip.

For the sake of example, the ISO contains a couple of directories and a binary file (notepad++ installer).

udf-example.zip

vbauzys commented 2 years ago

@rdavisunr thank you :)

vbauzys commented 2 years ago

Hey @rdavisunr

If you want to try now, then you can build from master the provider. Change will be released with 3.7.0 version :)