mirror of https://github.com/xwiki-labs/cryptpad
Fix copy bug from drive to drive
This commit is contained in:
parent
28d8f447d0
commit
f719ea53ac
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue