From a3033d609118553e805ade36b2f374410a3a6d73 Mon Sep 17 00:00:00 2001 From: lesion Date: Wed, 11 May 2016 17:06:33 +0200 Subject: [PATCH 1/3] version bump 1.1.1 bower mismatch Version declared in the json (0.13.0) is different than the resolved one (1.1.1) bower resolved https://github.com/markmarijnissen/cordova-promise-fs.git#1.1.1 --- bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bower.json b/bower.json index 16735b0..8dffebc 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "cordova-promise-fs", "main": "dist/CordovaPromiseFS.js", - "version": "0.13.0", + "version": "1.1.1", "homepage": "https://github.com/markmarijnissen/cordova-promise-fs", "authors": [ "Mark Marijnissen " From c5c8490b090a1fa59cb909415b98d0dd5fc3e315 Mon Sep 17 00:00:00 2001 From: lesion Date: Thu, 10 Jan 2019 16:14:09 +0100 Subject: [PATCH 2/3] check vs DOMExeption.NOT_FOUND_ERR for existence --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 900b9a9..805bb2d 100644 --- a/index.js +++ b/index.js @@ -278,7 +278,7 @@ module.exports = function(options){ resolve(fileEntry); }, function(err){ - if(err.code === 1) { + if(err.code === DOMException.NOT_FOUND_ERR) { resolve(false); } else { reject(err); @@ -296,7 +296,7 @@ module.exports = function(options){ resolve(dirEntry); }, function(err){ - if(err.code === 1) { + if(err.code === DOMException.NOT_FOUND_ERR) { resolve(false); } else { reject(err); From c114519709c1add79499fe76b97a85c90aecad3d Mon Sep 17 00:00:00 2001 From: lesion Date: Tue, 15 Jan 2019 13:29:10 +0100 Subject: [PATCH 3/3] fs api's err code are different between cordova ios and browser? --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 805bb2d..103f598 100644 --- a/index.js +++ b/index.js @@ -278,7 +278,7 @@ module.exports = function(options){ resolve(fileEntry); }, function(err){ - if(err.code === DOMException.NOT_FOUND_ERR) { + if(err.code === DOMException.NOT_FOUND_ERR || err.code === 1) { resolve(false); } else { reject(err); @@ -296,7 +296,7 @@ module.exports = function(options){ resolve(dirEntry); }, function(err){ - if(err.code === DOMException.NOT_FOUND_ERR) { + if(err.code === DOMException.NOT_FOUND_ERR || err.code === 1) { resolve(false); } else { reject(err);