diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-03-22 15:31:18 +0100 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-03-22 18:09:30 +0100 |
commit | 24ecf3f4c91b93306dceb43577989ee137846844 (patch) | |
tree | b0986e541ecfb9378087e6f19d6ff948a795963f /apps/files/js/filelist.js | |
parent | 8c6b6b1f0d061272133ba5d2d44b055a12580d5b (diff) | |
download | nextcloud-server-24ecf3f4c91b93306dceb43577989ee137846844.tar.gz nextcloud-server-24ecf3f4c91b93306dceb43577989ee137846844.zip |
Fixed files copy/move when in favorites or recent section
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/js/filelist.js')
-rw-r--r-- | apps/files/js/filelist.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index e1a0491cdc8..9459b83dca2 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -2047,10 +2047,12 @@ * @param fileNames array of file names to move * @param targetPath absolute target path * @param callback function to call when movement is finished + * @param dir the dir path where fileNames are located (optionnal, will take current folder if undefined) */ - move: function(fileNames, targetPath, callback) { + move: function(fileNames, targetPath, callback, dir) { var self = this; - var dir = this.getCurrentDirectory(); + + dir = typeof dir === 'string' ? dir : this.getCurrentDirectory(); if (dir.charAt(dir.length - 1) !== '/') { dir += '/'; } @@ -2110,13 +2112,14 @@ * @param fileNames array of file names to copy * @param targetPath absolute target path * @param callback to call when copy is finished with success + * @param dir the dir path where fileNames are located (optionnal, will take current folder if undefined) */ - copy: function(fileNames, targetPath, callback) { + copy: function(fileNames, targetPath, callback, dir) { var self = this; var filesToNotify = []; var count = 0; - var dir = this.getCurrentDirectory(); + dir = typeof dir === 'string' ? dir : this.getCurrentDirectory(); if (dir.charAt(dir.length - 1) !== '/') { dir += '/'; } |