MobileChromeApps / cordova-plugin-zip

Zip plugin for Cordova apps
Other
168 stars 207 forks source link

[Android] Wrong path separator #73

Open ghost opened 7 years ago

ghost commented 7 years ago

Hi, I've noticed that the plugin was extracting files with the wrong path separator. The output directory is cordova.file.dataDirectory and the plugin extracted the files to ../media\text\text.txt instead of ../media/text/text.txt so I have errors reading these files. I temporary fix this by replacing the path separator in the src file: (outputDirectory + compressedName).replace('\\', '/')

In addition, any chance to add a check for the already extracted files? It extracts all the files every time I call the zip method.

Best regards.