diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-10-27 11:51:54 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-10-27 11:51:54 +0100 |
commit | f24386c4913c9e108bdfb8bee15190eaf3e61cab (patch) | |
tree | 750fc573bb090217a203eb2919e6cbf96f6b744e /apps/files_sharing/js/sharedfilelist.js | |
parent | d7d5a3bab51d952e05965e84b784d7eff0efc9c9 (diff) | |
download | nextcloud-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_sharing/js/sharedfilelist.js')
-rw-r--r-- | apps/files_sharing/js/sharedfilelist.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/files_sharing/js/sharedfilelist.js b/apps/files_sharing/js/sharedfilelist.js index 2e798a92578..edf138b97ae 100644 --- a/apps/files_sharing/js/sharedfilelist.js +++ b/apps/files_sharing/js/sharedfilelist.js @@ -123,6 +123,9 @@ this._reloadCall.abort(); } + // there is only root + this._setCurrentDir('/', false); + var promises = []; var shares = $.ajax({ url: OC.linkToOCS('apps/files_sharing/api/v1') + 'shares', @@ -173,17 +176,14 @@ if (shares[0].ocs && shares[0].ocs.data) { files = files.concat(this._makeFilesFromShares(shares[0].ocs.data)); - } else { - // TODO: error handling } if (remoteShares && remoteShares[0].ocs && remoteShares[0].ocs.data) { files = files.concat(this._makeFilesFromRemoteShares(remoteShares[0].ocs.data)); - } else { - // TODO: error handling } this.setFiles(files); + return true; }, _makeFilesFromRemoteShares: function(data) { |