-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Use '/' path separator on Windows for tar archives #24
Conversation
Creating a tar archive on Windows with a directory results instead in the file having '\\' in its name, and on extraction on POSIX, does not create the appropriate directory. To fix this, use `path.posix` to force the '/' path separator even if creating the archive on Windows.
Fixes #22 . |
Hmmm. How do I squash commits in the browser? |
Will this be merged? |
@Infiltrator Can you add a test case for this bug fix? |
I know this issue is old, but I confirmed that this fixes issues on Windows 10. I am generating a tgz using: compressing.tgz.compressDir(stagingDir, outputDest); Tools like 7Zip are unable to correctly extract the folder structure. When I apply the changes in this PR, everything works as expected. |
Codecov Report
@@ Coverage Diff @@
## master #24 +/- ##
=======================================
Coverage 96.64% 96.64%
=======================================
Files 19 19
Lines 597 597
Branches 112 112
=======================================
Hits 577 577
Misses 20 20
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
[skip ci] ## [1.9.1](v1.9.0...v1.9.1) (2023-08-02) ### Bug Fixes * Use '/' path separator on Windows for tar archives ([#24](#24)) ([3aa065b](3aa065b))
🎉 This PR is included in version 1.9.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thanks @fengmk2 for pushing this along. I'm trying to create a test for this, but there are a couple issues which fall into the "not worth it" category for me:
None of this seems worth it for what appears to be a reasonable and simple fix. Thanks for getting this in! |
Creating a tar archive on Windows with a directory results instead in the file having '\' in its name, and on extraction on POSIX, does not create the appropriate directory.
To fix this, use
path.posix
to force the '/' path separator even if creating the archive on Windows.closes #22