mirror of
https://github.com/ONLYOFFICE/server.git
synced 2026-04-07 14:04:35 +08:00
Merge pull request #437 from ONLYOFFICE/fix/bug64605
[bug] Fix bug 64605
This commit is contained in:
@ -836,6 +836,7 @@ function* commandSaveFromOrigin(ctx, cmd, outputData, password) {
|
||||
}
|
||||
var queueData = getSaveTask(ctx, cmd);
|
||||
queueData.setFromOrigin(true);
|
||||
queueData.setFromChanges(true);
|
||||
yield* docsCoServer.addTask(queueData, constants.QUEUE_PRIORITY_LOW);
|
||||
}
|
||||
outputData.setStatus('ok');
|
||||
|
||||
@ -417,14 +417,17 @@ function* processDownloadFromStorage(ctx, dataConvert, cmd, task, tempDirs, auth
|
||||
let concatDir;
|
||||
let concatTemplate;
|
||||
if (task.getFromOrigin() || task.getFromSettings()) {
|
||||
let changesDir = path.join(tempDirs.source, constants.CHANGES_NAME);
|
||||
fs.mkdirSync(changesDir);
|
||||
let filesCount = yield* downloadFileFromStorage(ctx, cmd.getSaveKey(), changesDir);
|
||||
if (filesCount > 0) {
|
||||
concatDir = changesDir;
|
||||
concatTemplate = "changes0";
|
||||
dataConvert.fromChanges = true;
|
||||
task.setFromChanges(dataConvert.fromChanges);
|
||||
if (task.getFromChanges()) {
|
||||
let changesDir = path.join(tempDirs.source, constants.CHANGES_NAME);
|
||||
fs.mkdirSync(changesDir);
|
||||
let filesCount = yield* downloadFileFromStorage(ctx, cmd.getSaveKey(), changesDir);
|
||||
if (filesCount > 0) {
|
||||
concatDir = changesDir;
|
||||
concatTemplate = "changes0";
|
||||
} else {
|
||||
dataConvert.fromChanges = false;
|
||||
task.setFromChanges(dataConvert.fromChanges);
|
||||
}
|
||||
}
|
||||
dataConvert.fileFrom = path.join(tempDirs.source, 'origin.' + cmd.getFormat());
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user