MobileChromeApps / cordova-plugin-zip

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

Unzip to existing folder #25

Closed tobbbe closed 10 years ago

tobbbe commented 10 years ago

First of all, thanks for a great tool!

What happens if I try to unzip a zip file to a path that already contains files with the same name as those I unpack? Will they overwrite them or skip? I dosen't get any errors doing this, but it would be good to know what actually happens.

mmocny commented 10 years ago

I appears as though we overwrite what's there, without removing any old files. So, you end up with all the most recent files, but also any old files that happen to be in that directory.

I think this is a fine default (say you want to extract 10 zip files into one common dir), and you can use application logic to clear the old directory if you want. Its possible we may want to add support for "prompt for file overwrite", and/or support zip file directory listing so you can implement that yourself in application logic.

However, for now I'm closing this since I do not think it is a priority (though, patches are always welcome if you would like to add this feature).

ghost commented 4 years ago

On iOS overwriting does no longer seem to work.