diff options
author | Lukas Reschke <lukas@owncloud.com> | 2016-07-01 15:19:08 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2016-07-01 15:19:21 +0200 |
commit | 76c73d5ec32828d9b5d546aefd489b8080b8bad5 (patch) | |
tree | 94b4d01929d5c7a9c20e4bc6b26700455bd7086f /apps | |
parent | 4ac9eaab0379cc0535a6ab18be0fa147facf1bd5 (diff) | |
download | nextcloud-server-76c73d5ec32828d9b5d546aefd489b8080b8bad5.tar.gz nextcloud-server-76c73d5ec32828d9b5d546aefd489b8080b8bad5.zip |
Match on 405
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/js/filelist.js | 2 | ||||
-rw-r--r-- | apps/files/tests/js/filelistSpec.js | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 506d423c817..0813d2cc30e 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1552,7 +1552,7 @@ return false; } - if (status === 404) { + if (status === 404 || status === 405) { // go back home this.changeDirectory('/'); return false; diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js index a9b6a1ac1c8..453f1cafcaf 100644 --- a/apps/files/tests/js/filelistSpec.js +++ b/apps/files/tests/js/filelistSpec.js @@ -1347,6 +1347,11 @@ describe('OCA.Files.FileList tests', function() { deferredList.reject(404); expect(fileList.getCurrentDirectory()).toEqual('/'); }); + it('switches to root dir when current directory returns 405', function() { + fileList.changeDirectory('/unexist'); + deferredList.reject(405); + expect(fileList.getCurrentDirectory()).toEqual('/'); + }); it('switches to root dir when current directory is forbidden', function() { fileList.changeDirectory('/unexist'); deferredList.reject(403); |