Skip to content

TagSpaces is an offline, open source, document manager with tagging support

trying to fix getpropertiespromise

uggrock03a48d5e60dc
diff --git a/data/cordova/cordova.api.js b/data/cordova/cordova.api.js
index 07a2a2d7c..123668ac3 100644
--- a/data/cordova/cordova.api.js
+++ b/data/cordova/cordova.api.js
@@ -430,6 +430,10 @@ define(function(require, exports, module) {
filePath = normalizePath(filePath);
//getFileSystemPromise(dir).then(function(fileSystem) {
var fileProperties = {};
+ // TODO function broken..
+ if (filePath.indexOf("file://") !== 0) {
+ filePath = "file:///" + filePath;
+ }
fsRoot.getFile(filePath, {
create: false,
exclusive: false
@@ -453,7 +457,7 @@ define(function(require, exports, module) {
}
},
function() {
- reject("error getting file");
+ reject("error getting file " + filePath);
}
);
});
@@ -781,7 +785,7 @@ define(function(require, exports, module) {
);
},
function() {
- reject("error getting directory");
+ reject("error getting directory " + dirPath);
}
);
});