From d3d0035a9a81ea5d3e314141069f4914e3c6ce54 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Fri, 6 Jun 2014 15:13:02 +0200 Subject: Use actual file path on rename/delete When renaming or deleting a file that is in a subdirectory, performing the action from the sharing overview or another file list view, the actual directory of the file must be used instead of the current directory. --- apps/files/js/fileactions.js | 2 +- apps/files/js/filelist.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/files/js') diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index de02bf5e730..04078d25706 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -255,7 +255,7 @@ this.register('all', 'Delete', OC.PERMISSION_DELETE, function () { return OC.imagePath('core', 'actions/delete'); }, function (filename, context) { - context.fileList.do_delete(filename); + context.fileList.do_delete(filename, context.dir); $('.tipsy').remove(); }); diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 4229988b171..c291c560589 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1215,7 +1215,7 @@ $.ajax({ url: OC.filePath('files','ajax','rename.php'), data: { - dir : self.getCurrentDirectory(), + dir : tr.attr('data-path') || self.getCurrentDirectory(), newname: newName, file: oldname }, -- cgit v1.2.3