From ec3166742b08eabcca2c6d2166070b4cee488bf7 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 18 Nov 2015 17:54:00 +0100 Subject: Properly join path sections This prevents double slashes that can mess up path comparisons in some cases. --- apps/files_trashbin/js/app.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'apps/files_trashbin') diff --git a/apps/files_trashbin/js/app.js b/apps/files_trashbin/js/app.js index 1f46f568bf2..600a8ce2b03 100644 --- a/apps/files_trashbin/js/app.js +++ b/apps/files_trashbin/js/app.js @@ -38,10 +38,7 @@ OCA.Trashbin.App = { var fileActions = new OCA.Files.FileActions(); fileActions.register('dir', 'Open', OC.PERMISSION_READ, '', function (filename, context) { var dir = context.fileList.getCurrentDirectory(); - if (dir !== '/') { - dir = dir + '/'; - } - context.fileList.changeDirectory(dir + filename); + context.fileList.changeDirectory(OC.joinPaths(dir, filename)); }); fileActions.setDefault('dir', 'Open'); -- cgit v1.2.3