-
-
Notifications
You must be signed in to change notification settings - Fork 384
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
Windows path handling (tar.gz, probably others, too) #313
Comments
Thanks; I don't have Windows to test this. Can you give more information? What exactly is broken? What is in the created archive?
We do use |
The problem seems to be that the Windows backlash is not removed/replaced with slashes but included in the archive entries in escaped form:
This is what I get if I unpack that file on Linux (using |
Ah, indeed, Can you test what I push to a branch? (Until I have a chance to write actual automated tests, heh. Just been busy lately.) |
I changed the two lines and it worked for me on Windows with Go 1.18. 7zip on windows now also opens and extracts the archive to a Windows folder with correctly named files. Thanks a lot! |
Great, thanks for confirming! |
What version of the package or command are you using?
v4 lastest (d777df9)
What are you trying to do?
Create a tar.gz file under windows.
What steps did you take?
What did you expect to happen, and what actually happened instead?
Opening the file with 7-zip should extract to the same directory structure of the original files
How do you think this should be fixed?
https://github.com/mholt/archiver/blob/master/archiver.go should probably use filepath instead of path since path only supports slashes and no backslashes
Bonus: What do you use archiver for, and do you find it useful?
Just got started but really like the API (and the author, thanks for Caddy!!!) :)
The text was updated successfully, but these errors were encountered: