TagSpaces is an offline, open source, document manager with tagging support
refining error handing for the list directory
uggrock6e4837b3aa84
diff --git a/data/js/ioutils.js b/data/js/ioutils.jsindex b9b7ab00e..effbc691e 100644--- a/data/js/ioutils.js+++ b/data/js/ioutils.js@@ -66,7 +66,7 @@ define(function(require, exports, module) {}}TSPOSTIO.listSubDirectories(anotatedDirList, dirPath);- }, function(error) {+ }).catch(function(error) {TSPOSTIO.errorOpeningPath(dirPath);TSCORE.hideLoadingAnimation();console.error("Error listDirectory " + dirPath + " error: " + error);diff --git a/data/js/perspective.manager.js b/data/js/perspective.manager.jsindex f3f1a2de6..cfb9c3b99 100644--- a/data/js/perspective.manager.js+++ b/data/js/perspective.manager.js@@ -308,16 +308,12 @@ define(function(require, exports, module) {var refreshFileListContainer = function() {// TODO consider search view- //TSCORE.showLoadingAnimation();- TSCORE.IO.listDirectoryPromise(TSCORE.currentPath).then(- function(entries) {- TSPOSTIO.listDirectory(entries);- },- function(err) {- TSPOSTIO.errorOpeningPath();- console.warn("Error listing directory" + err);- }- );+ TSCORE.IO.listDirectoryPromise(TSCORE.currentPath).then(function(entries) {+ TSPOSTIO.listDirectory(entries);+ }).catch(function(err) {+ TSPOSTIO.errorOpeningPath(TSCORE.currentPath);+ console.warn("Error listing directory" + err);+ });};var hideAllPerspectives = function() {