Skip to content

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

Merge branch 'TS198-io-api-migration' into TS191-desktop-search

uggrockab9af31e5ad0
diff --cc data/web/web.api.js
index 16b9a2dc1,d11c5f02f..b13817a66
--- a/data/web/web.api.js
+++ b/data/web/web.api.js
@@@ -399,19 -404,14 +404,10 @@@ define(function(require, exports, modul
console.log("selectFile function not relevant for webdav..");
};
- var openExtensionsDirectory = function() {
- console.log("openExtensionsDirectory function not relevant for webdav..");
- };
-
var getFileProperties = function(filePath) {
-
- davClient.propfind(encodeURI(filePath), function(status, data) {
- console.log("Properties Status / Content: " + status + " / " + JSON.stringify(data._responses));
- var fileProperties = {};
- for (var entry in data._responses) {
- fileProperties.path = filePath;
- fileProperties.size = data._responses[entry]._namespaces["DAV:"].getcontentlength;
- fileProperties.lmdt = data._responses[entry]._namespaces["DAV:"].getlastmodified._xmlvalue[0].data;
- }
- if (checkStatusCode(status)) {
+ getFilePropertiesPromise(filePath).then(function(fileProperties) {
TSPOSTIO.getFileProperties(fileProperties);
- } else {
+ }, function(error) {
TSCORE.hideLoadingAnimation();
TSCORE.closeFileViewer();
TSCORE.showAlertDialog("File " + filePath + " get properties failed");