-
-
Notifications
You must be signed in to change notification settings - Fork 376
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
Error when trying to unrar archive with subfolders #5
Comments
Thanks for the report! So are file1.jpg and file2.jpg inside testfolder? |
correct, those files are within the subfolder (inside the archive). |
Thanks. Can you send me the .rar file? I don't have a way to make them (and I'd rather not install one on my Mac... heh) 😄 My email address is at https://matt.chat. |
No problem, sent you the file I've been testing against. |
Got it, thanks. Will check it out soon! |
Quick and dirty string comparison workaround here: |
Fixed in #7. Thank you! |
I've published a new release with this and another fix: https://github.com/mholt/archiver/releases/tag/v1.1.1 |
Here is an example of the file:
test.zip (and test.rar)
_______/testfolder/
________________file1.jpg
________________file2.jpg
When using archive.Unzip, it behaves as expected -- creates the subfolders as they are in the zip archive:
err := archiver.Unzip("c:\\tmp\\test.zip", "c:\\tmp\\test\\")
However when running the same command to unrar, it appears as though it's not able to Mkdir the subfolders.
err := archiver.Unrar("c:\\tmp\\test.rar", "c:\\tmp\\test\\")
Error:
If it helps, line 41 of rar.go is checking
if header.IsDir
but it seems to evaluate as false, since technically the path includes both the folder and the filename (I'm assuming).The text was updated successfully, but these errors were encountered: