mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #1044 from owncloud/fix_extra_slash
Remove duplicate / for first folder in root
This commit is contained in:
commit
e3df2b8c87
1 changed files with 5 additions and 1 deletions
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Reference in a new issue