Signed-off-by: Robin Appelman <robin@icewind.nl>
if (e && _.isString(e.dir)) {
var currentDir = this.getCurrentDirectory();
// this._currentDirectory is NULL when fileList is first initialised
- if( (this._currentDirectory || this.$el.find('#dir').val()) && currentDir === e.dir) {
+ if(this._currentDirectory && currentDir === e.dir) {
return;
}
this.changeDirectory(e.dir, true, true, undefined, true);
beforeEach(function() {
fileListStub = sinon.stub(OCA.Files.FileList.prototype, 'changeDirectory');
+ fileList._currentDirectory = '/subdir';
});
afterEach(function() {
fileListStub.restore();