aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-12-28 20:10:01 -0500
committerJörn Friedrich Dreyer <jfd@butonic.de>2013-02-09 13:07:52 +0100
commite928a342c452b49ed84e36d3534bb9715f55845b (patch)
tree9d0124202665109d4d7273f8b2bc01a580620b70 /apps/files
parentab4ae2b952fedf7bac2810bb6be7997fb661a1fc (diff)
downloadnextcloud-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.js6
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');