Check if extra / is necessary for the folder URL

remotes/origin/stable6
Michael Gapczynski 12 years ago committed by Jörn Friedrich Dreyer
parent ab4ae2b952
commit e928a342c4
  1. 6
      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');

Loading…
Cancel
Save