-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
Unable to extract 7z archives with long paths #116
Comments
Could @asrabon upload a simple data which include a path over 255 characters which cause the issue? |
Here is the file if you need any additional samples please just let me know I will be glad to provide some. The file is a zip of the 7z file since github doesn't allow uploads of 7zs. |
When running
Does it really extract correctly on your platform? With py7zr, it also become OS error.
Py7zr should catch os error and show better error message at least. |
I'm wondering that the test data has a 'backslash` for path separator and p7zip and py7zr understand it is a part of filename not path separator. Then p7zip and py7zr try to create a filename which has a backslash as a part of filename with length is over > 255. It may cause an OS error because many file system has a limitation of filename length as 255 bytes. On linux, it allow 4096 bytes for path length. |
I have been using 7zip on windows and it has been extracting the files without issues. Whenever I iterate through through the list of files in the archive and attempt to extract each one individually. When it hits one with a long path it will eventually give the LZMAError I mentioned above when it attempts to decompress the data. |
I cannot reproduce LZMA error. |
@asrabon I just found Windows has a limitation MAX_PATH in 260 bytes. |
This comment has been minimized.
This comment has been minimized.
Update, I've added modification of registory entry and update py7zr code then it seems solved.
Then test case
passed. |
v0.7.0b2 released with enhancement for this. Please update your machine repository before testing in order for your Windows 10 to accept long path > 260bytes. |
Do not get a negative feedback. Close now but please reopen when not fixes your case. |
If you create any 7z archive that has a path over 255 characters(8.3 naming convention). The program will fail to unpack them and give a "_lzma.LZMAError". If the archive contains some files that aren't in a ton of subdirectories to the point where the file falls into the 8.3 naming convention it will extract those fine it is just when it comes across a file with a 7zip file path of more than 255 characters.
The text was updated successfully, but these errors were encountered: