Skip to content

Commit

Permalink
All: Fixes #1353: Remove message "Processing a path that has already …
Browse files Browse the repository at this point in the history
…been done" as this is not an error
  • Loading branch information
laurent22 committed Apr 29, 2019
1 parent 6d68e61 commit 6d22000
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ReactNativeClient/lib/synchronizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ class Synchronizer {
// the local sync_time will be updated to Date.now() but on the next loop it will see that the remote item still has a date ahead
// and will see a conflict. There's currently no automatic fix for this - the remote item on the sync target must be fixed manually
// (by setting an updated_time less than current time).
if (donePaths.indexOf(path) >= 0) throw new Error(sprintf("Processing a path that has already been done: %s. sync_time was not updated? Remote item has an updated_time in the future?", path));
if (donePaths.indexOf(path) >= 0) throw new JoplinError(sprintf("Processing a path that has already been done: %s. sync_time was not updated? Remote item has an updated_time in the future?", path), 'processingPathTwice');

let remote = await this.api().stat(path);
let action = null;
Expand Down Expand Up @@ -662,9 +662,10 @@ class Synchronizer {
}
} // DELTA STEP
} catch (error) {
if (error && ["cannotEncryptEncrypted", "noActiveMasterKey"].indexOf(error.code) >= 0) {
if (error && ["cannotEncryptEncrypted", "noActiveMasterKey", "processingPathTwice"].indexOf(error.code) >= 0) {
// Only log an info statement for this since this is a common condition that is reported
// in the application, and needs to be resolved by the user
// in the application, and needs to be resolved by the user.
// Or it's a temporary issue that will be resolved on next sync.
this.logger().info(error.message);
} else {
this.logger().error(error);
Expand Down

0 comments on commit 6d22000

Please sign in to comment.