Start out empty if cache file is missing

This commit is contained in:
Girish Ramakrishnan
2017-09-27 12:09:19 -07:00
parent 003dc0dbaf
commit 39f0e476f2
2 changed files with 5 additions and 1 deletions

View File

@@ -223,7 +223,7 @@ function sync(backupConfig, backupId, dataDir, callback) {
var stream = fs.createReadStream(path.join(dataDir, task.path));
stream.on('error', function () { return iteratorCallback(); }); // ignore error if file disappears
api(backupConfig.provider).upload(backupConfig, getBackupFilePath(backupConfig, backupId, task.path), stream, iteratorCallback);
} else if (task.operation === 'remove') {
} else if (task.operation === 'remove' || task.operation === 'removedir') {
safe.fs.writeFileSync(paths.BACKUP_RESULT_FILE, 'Removing ' + task.path);
api(backupConfig.provider).remove(backupConfig, getBackupFilePath(backupConfig, backupId, task.path), iteratorCallback);
}