diff --git a/www/common/proxy-manager.js b/www/common/proxy-manager.js index 017a403bb..b6bba79b7 100644 --- a/www/common/proxy-manager.js +++ b/www/common/proxy-manager.js @@ -314,7 +314,7 @@ define([ // Move from the main drive if (!newResolved.id) { // Move from the main drive to the main drive - Env.user.userObject.move(resolved.main, newResolved.path, waitFor()); + Env.user.userObject.move(resolved.main, newResolved.path, copy, waitFor()); } else { // Move from the main drive to a shared folder @@ -354,7 +354,7 @@ define([ var paths = resolved.folders[fId]; if (newResolved.id === fId) { // Move to the same shared folder - newResolved.userObject.move(paths, newResolved.path, waitFor()); + newResolved.userObject.move(paths, newResolved.path, copy, waitFor()); } else { // Move to a different shared folder or to main drive var uoFrom = Env.folders[fId].userObject; diff --git a/www/common/userObject.js b/www/common/userObject.js index 096cc5057..df042ebdf 100644 --- a/www/common/userObject.js +++ b/www/common/userObject.js @@ -582,7 +582,7 @@ define([ }; // MOVE - var move = exp.move = function (paths, newPath, cb) { + var move = exp.move = function (paths, newPath, copy, cb) { if (sframeChan) { return void sframeChan.query("Q_DRIVE_USEROBJECT", { cmd: "move", @@ -607,6 +607,7 @@ define([ toRemove.push(p); } }); + if (copy) { return void cb(); } exp.delete(toRemove, cb); }; exp.restore = function (path, cb) {