summaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2013-06-28 12:00:35 -0700
committerBart Visscher <bartv@thisnet.nl>2013-06-28 12:00:35 -0700
commite3df2b8c873a4a03156714bf09f1ed7c98129f4f (patch)
treeab0a08b81b698a5ecf170e2e2556066f7de41d4f /apps/files/js
parentf3c4a37a78763df5481b01be936f73ca70426ed3 (diff)
parent89dc8be9f550310f86e2e7da9cdb1da630080f49 (diff)
downloadnextcloud-server-e3df2b8c873a4a03156714bf09f1ed7c98129f4f.tar.gz
nextcloud-server-e3df2b8c873a4a03156714bf09f1ed7c98129f4f.zip
Merge pull request #1044 from owncloud/fix_extra_slash
Remove duplicate / for first folder in root
Diffstat (limited to 'apps/files/js')
-rw-r--r--apps/files/js/fileactions.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js
index 14fca6f1482..aa66a57a7b5 100644
--- a/apps/files/js/fileactions.js
+++ b/apps/files/js/fileactions.js
@@ -200,7 +200,11 @@ FileActions.register('all', 'Rename', OC.PERMISSION_UPDATE, function () {
FileActions.register('dir', 'Open', OC.PERMISSION_READ, '', function (filename) {
- window.location = OC.linkTo('files', 'index.php') + '?dir=' + encodeURIComponent($('#dir').val()).replace(/%2F/g, '/') + '/' + encodeURIComponent(filename);
+ var dir = $('#dir').val()
+ if (dir !== '/') {
+ dir = dir + '/';
+ }
+ window.location = OC.linkTo('files', 'index.php') + '?dir=' + encodeURIComponent(dir + filename);
});
FileActions.setDefault('dir', 'Open');