Merge pull request #1044 from owncloud/fix_extra_slash

Remove duplicate / for first folder in root
This commit is contained in:
Bart Visscher 2013-06-28 12:00:35 -07:00
commit e3df2b8c87

View file

@ -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');