1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-02-04 19:16:07 +02:00

Fixed note conflict sync

This commit is contained in:
Laurent Cozic 2017-07-02 21:40:50 +01:00
parent a11acb0fa8
commit 8f5219fb79
2 changed files with 4 additions and 1 deletions

View File

@ -6,6 +6,6 @@
"helpers": [ "helpers": [
"helpers/**/*.js" "helpers/**/*.js"
], ],
"stopSpecOnExpectationFailure": false, "stopSpecOnExpectationFailure": true,
"random": false "random": false
} }

View File

@ -174,6 +174,7 @@ class Synchronizer {
this.logSyncOperation(action, local, remote, reason); this.logSyncOperation(action, local, remote, reason);
if (local.type_ == BaseModel.MODEL_TYPE_RESOURCE && (action == 'createRemote' || (action == 'itemConflict' && remote))) { if (local.type_ == BaseModel.MODEL_TYPE_RESOURCE && (action == 'createRemote' || (action == 'itemConflict' && remote))) {
let remoteContentPath = this.resourceDirName_ + '/' + local.id; let remoteContentPath = this.resourceDirName_ + '/' + local.id;
let resourceContent = await Resource.content(local); let resourceContent = await Resource.content(local);
@ -223,6 +224,8 @@ class Synchronizer {
local.sync_time = time.unixMs(); local.sync_time = time.unixMs();
await ItemClass.save(local, { autoTimestamp: false }); await ItemClass.save(local, { autoTimestamp: false });
} else {
await ItemClass.delete(local.id);
} }
} }