torrmal / cordova-simplefilemanagement

This makes file/directory creation-deletion, red/write. download very simple.
24 stars 29 forks source link

Possible bug with directory creation #3

Open vankov1 opened 10 years ago

vankov1 commented 10 years ago

I think there is a little problem with the check in load_file method which has to create directories. With Cordova 3.5 and Android Kit Kat it gives different errors (9 and 1000 instead of 3) when the folder does not exist. If you change the check everything works fine.

// if target folder does not exist, create it
if(error.code == 3){
Log('FileManager','msg')('folder does not exist, creating it');
traildex commented 10 years ago

@vankov1 should it be if(error.code == 3 || error.code == 9 || error.code == 1000){ or if(error.code == 9 || error.code == 1000){

torrmal commented 9 years ago

cool, you can send a pull request and I will merge it right away.