From f24386c4913c9e108bdfb8bee15190eaf3e61cab Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Tue, 27 Oct 2015 11:51:54 +0100 Subject: 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. --- apps/files/js/favoritesfilelist.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'apps/files') diff --git a/apps/files/js/favoritesfilelist.js b/apps/files/js/favoritesfilelist.js index 4e7db9f17ba..e6532ab188c 100644 --- a/apps/files/js/favoritesfilelist.js +++ b/apps/files/js/favoritesfilelist.js @@ -71,6 +71,10 @@ $(document).ready(function() { if (this._reloadCall) { this._reloadCall.abort(); } + + // there is only root + this._setCurrentDir('/', false); + this._reloadCall = $.ajax({ url: OC.generateUrl('/apps/files/api/v1/tags/{tagName}/files', {tagName: tagName}), type: 'GET', @@ -86,10 +90,9 @@ $(document).ready(function() { if (result.files) { this.setFiles(result.files.sort(this._sortComparator)); + return true; } - else { - // TODO: error handling - } + return false; } }); -- cgit v1.2.3