ngCordova $cordovaFile.createDir replace not working


#1

Hello There,

I have found that the replace attribute in the createDir method is not obeyed. When set to true and the file already exists I get error code 12 (PATH_EXISTS_ERR). I thought I would mention it on this forum even though I am quite sure it is a problem with Cordova getDirectory and the exclusive property not working properly.

$cordovaFile.createDir("test", true).then(function (result) {
    console.log("Directory Created");
}, function(err) {
    //This line is being called when the file already exists
    console.log("Error creating directory: "+err);
}

If anyone has an idea as to a work around that would be great.

David