Skip to content
Snippets Groups Projects
Commit 5bf476ef authored by Thomas Müller's avatar Thomas Müller
Browse files

Merge pull request #20079 from owncloud/filelist-invalidpath

Fix file list reload callback result
parents 527ef76d f24386c4
Branches
No related tags found
No related merge requests found
...@@ -71,6 +71,10 @@ $(document).ready(function() { ...@@ -71,6 +71,10 @@ $(document).ready(function() {
if (this._reloadCall) { if (this._reloadCall) {
this._reloadCall.abort(); this._reloadCall.abort();
} }
// there is only root
this._setCurrentDir('/', false);
this._reloadCall = $.ajax({ this._reloadCall = $.ajax({
url: OC.generateUrl('/apps/files/api/v1/tags/{tagName}/files', {tagName: tagName}), url: OC.generateUrl('/apps/files/api/v1/tags/{tagName}/files', {tagName: tagName}),
type: 'GET', type: 'GET',
...@@ -86,10 +90,9 @@ $(document).ready(function() { ...@@ -86,10 +90,9 @@ $(document).ready(function() {
if (result.files) { if (result.files) {
this.setFiles(result.files.sort(this._sortComparator)); this.setFiles(result.files.sort(this._sortComparator));
return true;
} }
else { return false;
// TODO: error handling
}
} }
}); });
......
...@@ -86,6 +86,10 @@ ...@@ -86,6 +86,10 @@
if (this._reloadCall) { if (this._reloadCall) {
this._reloadCall.abort(); this._reloadCall.abort();
} }
// there is only root
this._setCurrentDir('/', false);
this._reloadCall = $.ajax({ this._reloadCall = $.ajax({
url: OC.linkToOCS('apps/files_external/api/v1') + 'mounts', url: OC.linkToOCS('apps/files_external/api/v1') + 'mounts',
data: { data: {
...@@ -106,10 +110,9 @@ ...@@ -106,10 +110,9 @@
if (result.ocs && result.ocs.data) { if (result.ocs && result.ocs.data) {
this.setFiles(this._makeFiles(result.ocs.data)); this.setFiles(this._makeFiles(result.ocs.data));
return true;
} }
else { return false;
// TODO: error handling
}
}, },
/** /**
......
...@@ -123,6 +123,9 @@ ...@@ -123,6 +123,9 @@
this._reloadCall.abort(); this._reloadCall.abort();
} }
// there is only root
this._setCurrentDir('/', false);
var promises = []; var promises = [];
var shares = $.ajax({ var shares = $.ajax({
url: OC.linkToOCS('apps/files_sharing/api/v1') + 'shares', url: OC.linkToOCS('apps/files_sharing/api/v1') + 'shares',
...@@ -173,17 +176,14 @@ ...@@ -173,17 +176,14 @@
if (shares[0].ocs && shares[0].ocs.data) { if (shares[0].ocs && shares[0].ocs.data) {
files = files.concat(this._makeFilesFromShares(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) { if (remoteShares && remoteShares[0].ocs && remoteShares[0].ocs.data) {
files = files.concat(this._makeFilesFromRemoteShares(remoteShares[0].ocs.data)); files = files.concat(this._makeFilesFromRemoteShares(remoteShares[0].ocs.data));
} else {
// TODO: error handling
} }
this.setFiles(files); this.setFiles(files);
return true;
}, },
_makeFilesFromRemoteShares: function(data) { _makeFilesFromRemoteShares: function(data) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment