1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

various changes

This commit is contained in:
Laurent Cozic
2017-07-12 23:32:08 +01:00
parent 74e112fef9
commit d92f1c7eba
9 changed files with 62 additions and 26 deletions

View File

@ -214,11 +214,17 @@ class Synchronizer {
// Make the operation atomic by doing the work on a copy of the file
// and then copying it back to the original location.
let tempPath = this.syncDirName_ + '/' + path + '_' + time.unixMs();
// let tempPath = this.syncDirName_ + '/' + path + '_' + time.unixMs();
//
// Atomic operation is disabled for now because it's not possible
// to do an atomic move with OneDrive (see file-api-driver-onedrive.js)
await this.api().put(tempPath, content);
await this.api().setTimestamp(tempPath, local.updated_time);
await this.api().move(tempPath, path);
// await this.api().put(tempPath, content);
// await this.api().setTimestamp(tempPath, local.updated_time);
// await this.api().move(tempPath, path);
await this.api().put(path, content);
await this.api().setTimestamp(path, local.updated_time);
if (this.randomFailure(options, 0)) return;