aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-07-01 11:10:37 +0200
committerVincent Petry <pvince81@owncloud.com>2016-07-01 11:10:37 +0200
commit4acb06923d633bba9151237b0f0a88dcf99da7e6 (patch)
tree87e9f4630e24c8efe62d1b6f9e5325c500270556 /apps/files/js
parent2d2d2267f7f38ca29e7b87f40fae62261614b0d1 (diff)
downloadnextcloud-server-4acb06923d633bba9151237b0f0a88dcf99da7e6.tar.gz
nextcloud-server-4acb06923d633bba9151237b0f0a88dcf99da7e6.zip
Filelist change dir auto-prepend slash
Prepend a slash to directories in case it was missing since many places assume that it's there.
Diffstat (limited to 'apps/files/js')
-rw-r--r--apps/files/js/filelist.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 690e5e70fdb..40261a9f36c 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -513,7 +513,7 @@
* Event handler for when the URL changed
*/
_onUrlChanged: function(e) {
- if (e && e.dir) {
+ if (e && _.isString(e.dir)) {
this.changeDirectory(e.dir, false, true);
}
},
@@ -1415,6 +1415,9 @@
this.setPageTitle();
}
+ if (targetDir.length > 0 && targetDir[0] !== '/') {
+ targetDir = '/' + targetDir;
+ }
this._currentDirectory = targetDir;
// legacy stuff