-
Notifications
You must be signed in to change notification settings - Fork 443
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
ZIP file names do not extract correctly if ZIP is created on Windows and unzipped on Linux #55
Comments
Good catch. Perhaps you should also open a ticket on sbt/sbt about the sbt.IO issue as well.... |
It looks ok on sbt.IO, came across it from Play Framework packaging, is the intent to keep zipping separate from sbt.IO ZIP handling? there is a sbt.IO.zip method as well. |
No, our zipping is a bit of a historical accident how it came to be the way it is.
I'd like to try to add commons-compress with Info-Zip back in, as it's slightly better than sbt.IO. However, if the default mappings we pass to the zip-creator are bombing, then that needs to be fixed. Thanks for the report. Pull requests welcome, I'll add this to my TODOs before the next release. |
Ok, yeah saw a lot of similar zip handling out in sbt.IO - was rather confused trying to track this one down. As soem of the packaging for the jar used sbt.IO but the distro zip used sbt-native-packager. Might just be how the tasks are being setup in play framework. |
Issue #55 - Correct ZIP entry names when created on a Windows system
Cool, pr was accepted, so closing. |
When a ZIP is created on a Windows platform which passes in file names created from File.getPath, the directory separators used are Windows backslash. The ZIP entry then creates the filename with these backslashes. Unzipping on a Linux based system unzips these files with the filename including the directory name, ie;
share\doc\api\views\html\commands\index$.html
Is the filename.
Similar to IO.scala in sbt, the file names need to be normalized such that if the separatorChar is '' then they need to be replaced with '/'
The text was updated successfully, but these errors were encountered: