aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files/js/filelist.js1
-rw-r--r--apps/files/tests/js/filelistSpec.js4
2 files changed, 4 insertions, 1 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index cc23ac73979..395490d3553 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -1673,6 +1673,7 @@
// close sidebar
this._updateDetailsView(null);
}
+ this._setCurrentDir(this.getCurrentDirectory(), false);
var callBack = this.reloadCallback.bind(this);
return this._reloadCall.then(callBack, callBack);
},
diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js
index 836a5e5ce71..8154ffaa7c2 100644
--- a/apps/files/tests/js/filelistSpec.js
+++ b/apps/files/tests/js/filelistSpec.js
@@ -1621,7 +1621,9 @@ describe('OCA.Files.FileList tests', function() {
var setDirSpy = sinon.spy(fileList.breadcrumb, 'setDirectory');
fileList.changeDirectory('/anothersubdir');
deferredList.resolve(200, [testRoot].concat(testFiles));
- expect(fileList.breadcrumb.setDirectory.calledOnce).toEqual(true);
+ // twice because setDirectory gets called by _setCurrentDir which
+ // gets called directly by changeDirectory and via reload()
+ expect(fileList.breadcrumb.setDirectory.calledTwice).toEqual(true);
expect(fileList.breadcrumb.setDirectory.calledWith('/anothersubdir')).toEqual(true);
setDirSpy.restore();
getFolderContentsStub.restore();