summaryrefslogtreecommitdiffstats
path: root/apps/files_external/js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-10-27 11:51:54 +0100
committerVincent Petry <pvince81@owncloud.com>2015-10-27 11:51:54 +0100
commitf24386c4913c9e108bdfb8bee15190eaf3e61cab (patch)
tree750fc573bb090217a203eb2919e6cbf96f6b744e /apps/files_external/js
parentd7d5a3bab51d952e05965e84b784d7eff0efc9c9 (diff)
downloadnextcloud-server-f24386c4913c9e108bdfb8bee15190eaf3e61cab.tar.gz
nextcloud-server-f24386c4913c9e108bdfb8bee15190eaf3e61cab.zip
Fix file list reload callback result
All reloadCallback must return either true for success or false in case of failure / non-existing folder. Some file lists only have a root folder (favorite, shares), so restrict the path to that to avoid having a wrong path in the breadcrumbs.
Diffstat (limited to 'apps/files_external/js')
-rw-r--r--apps/files_external/js/mountsfilelist.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/files_external/js/mountsfilelist.js b/apps/files_external/js/mountsfilelist.js
index c45faafd9bf..35aef751fef 100644
--- a/apps/files_external/js/mountsfilelist.js
+++ b/apps/files_external/js/mountsfilelist.js
@@ -86,6 +86,10 @@
if (this._reloadCall) {
this._reloadCall.abort();
}
+
+ // there is only root
+ this._setCurrentDir('/', false);
+
this._reloadCall = $.ajax({
url: OC.linkToOCS('apps/files_external/api/v1') + 'mounts',
data: {
@@ -106,10 +110,9 @@
if (result.ocs && result.ocs.data) {
this.setFiles(this._makeFiles(result.ocs.data));
+ return true;
}
- else {
- // TODO: error handling
- }
+ return false;
},
/**