Skip to content
Snippets Groups Projects
Commit e3df2b8c authored by Bart Visscher's avatar Bart Visscher
Browse files

Merge pull request #1044 from owncloud/fix_extra_slash

Remove duplicate / for first folder in root
parents f3c4a37a 89dc8be9
No related branches found
No related tags found
No related merge requests found
...@@ -200,7 +200,11 @@ FileActions.register('all', 'Rename', OC.PERMISSION_UPDATE, function () { ...@@ -200,7 +200,11 @@ FileActions.register('all', 'Rename', OC.PERMISSION_UPDATE, function () {
FileActions.register('dir', 'Open', OC.PERMISSION_READ, '', function (filename) { 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'); FileActions.setDefault('dir', 'Open');
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment