Skip to content

Conversation

sudo-bmitch
Copy link
Contributor

@sudo-bmitch sudo-bmitch commented Jul 22, 2024

Fixes issue

Fixes #786.

Describe the change

The correct path separator inside of a tar file is /. On Windows, the filepath.Clean is converting these to backslashes. This either removes the filepath.Clean where it's not needed, or adds a filepath.ToSlash to ensure the tar filename separator is always assumed to be a /.

How to verify it

Export an image on Windows.

Changelog text

  • Fix: Tar path separator should always be a /. (H/T @stormyyd)

Please verify and check that the pull request fulfills the following requirements

Tests for this are difficult since they depend on Go's behavior on a Windows system.

  • Tests have been added or not applicable
  • Documentation has been added, updated, or not applicable
  • Changes have been rebased to main
  • Multiple commits to the same code have been squashed

Signed-off-by: Brandon Mitchell <git@bmitch.net>
@sudo-bmitch sudo-bmitch merged commit f91402c into regclient:main Jul 23, 2024
5 checks passed
@sudo-bmitch sudo-bmitch deleted the pr-tar-slash branch July 23, 2024 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Issue] Odd tarball layout on Windows platform when exporting image by regctl
1 participant