mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
Check if extra / is necessary for the folder URL
This commit is contained in:
parent
ab4ae2b952
commit
e928a342c4
1 changed files with 5 additions and 1 deletions
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Reference in a new issue