diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-12-28 20:10:01 -0500 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-02-09 13:07:52 +0100 |
commit | e928a342c452b49ed84e36d3534bb9715f55845b (patch) | |
tree | 9d0124202665109d4d7273f8b2bc01a580620b70 /apps/files | |
parent | ab4ae2b952fedf7bac2810bb6be7997fb661a1fc (diff) | |
download | nextcloud-server-e928a342c452b49ed84e36d3534bb9715f55845b.tar.gz nextcloud-server-e928a342c452b49ed84e36d3534bb9715f55845b.zip |
Check if extra / is necessary for the folder URL
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/js/fileactions.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index e1d8b60d315..533b11a6e50 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -190,7 +190,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 = encodeURIComponent($('#dir').val()).replace(/%2F/g, '/'); + if (dir != '/') { + dir = dir + '/'; + } + window.location = OC.linkTo('files', 'index.php') + '?dir=' + dir + encodeURIComponent(filename); }); FileActions.setDefault('dir', 'Open'); |