diff --git a/CliClient/tests/support/jasmine.json b/CliClient/tests/support/jasmine.json index 3ea316690..e56eb01b7 100644 --- a/CliClient/tests/support/jasmine.json +++ b/CliClient/tests/support/jasmine.json @@ -6,6 +6,6 @@ "helpers": [ "helpers/**/*.js" ], - "stopSpecOnExpectationFailure": false, + "stopSpecOnExpectationFailure": true, "random": false } diff --git a/lib/synchronizer.js b/lib/synchronizer.js index da05ed6b1..0c5cedc19 100644 --- a/lib/synchronizer.js +++ b/lib/synchronizer.js @@ -174,6 +174,7 @@ class Synchronizer { this.logSyncOperation(action, local, remote, reason); + if (local.type_ == BaseModel.MODEL_TYPE_RESOURCE && (action == 'createRemote' || (action == 'itemConflict' && remote))) { let remoteContentPath = this.resourceDirName_ + '/' + local.id; let resourceContent = await Resource.content(local); @@ -223,6 +224,8 @@ class Synchronizer { local.sync_time = time.unixMs(); await ItemClass.save(local, { autoTimestamp: false }); + } else { + await ItemClass.delete(local.id); } }