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:
parent
a11acb0fa8
commit
8f5219fb79
@ -6,6 +6,6 @@
|
|||||||
"helpers": [
|
"helpers": [
|
||||||
"helpers/**/*.js"
|
"helpers/**/*.js"
|
||||||
],
|
],
|
||||||
"stopSpecOnExpectationFailure": false,
|
"stopSpecOnExpectationFailure": true,
|
||||||
"random": false
|
"random": false
|
||||||
}
|
}
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user