Closed fefc closed 4 years ago
So, after almost a year 🤦♂ I found some time to see this...
@fefc Thanks a lot for contribute, just one question: Does this happen with __MACOS/
folder only or with other resources? Mainly because i'm considering to just avoid compress __MACOS/
folder and .DS_STORE
files
Regards
Hi! Thanks for getting back to me :)
I have this issue with Android (I don't use the iOS part at the moment) and the original issue (with a bit of description) is here:
https://github.com/jjdltc/jjdltc-cordova-plugin-zip/issues/8
This pull request should fix issue #8
Let me know if you have any more questions!
Hi @fefc
In short: Thanks a lot, I will merge this.
Long History: This is a little bittersweet, mainly because I couldn't reproduce what you mention (I tried follow the issue #8 ) but this code in fact solve other issue I didn't notice before unzipping __MACOSX
folder, so I will merge this and leve the issue #8 open so I can ask a few more things that will help me to understand why its failing with your compress file. I still think is related to hidden OS files like the __MACOSX
but I need you to confirm that, If you prefer not to continue with that, just close the issue
By the way, This is the first Pull Request ever merged with a project I own (Insert here a happy face)
Regards.
This allows unzipping in cacheDirectory (this might not be related but it's how I found the bug).
Apparently the original code in charge of creating the directories of extracted files does not work:
entry.isDirectory() never gets true
So I've added a few lines just to make sure the directory exists. Also changed mkdir() to mkdirs() to allow creation of deeper directories.