MobileChromeApps / cordova-plugin-zip

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

create parent directory if it doesn't exist #13

Closed tlancina closed 10 years ago

tlancina commented 10 years ago

If the file is in a directory that hasn't been created yet, then createNewFile() throws an IO error.

For example if the outputDirectory is '/home/projects/' and the compressedName is 'www/files/src.java' and '/home/projects/www/files/' doesn't exist yet, then java.io.IOException: open failed: ENOENT (No such file or directory) gets thrown.

mmocny commented 10 years ago

Tim, thanks a bunch for the patch. Looks good, but I am not set up to test out the various test cases just this moment. Will make sure this is addressed in the morning.