diff --git a/js/google-helper.js b/js/google-helper.js index 4eff7b1f..69843c48 100644 --- a/js/google-helper.js +++ b/js/google-helper.js @@ -161,11 +161,13 @@ define(["jquery", "async-runner"], function($, asyncTaskRunner) { } var error = response.error; // Handle error - if(error !== undefined && fileId !== undefined && error.code === 404) { + if(error !== undefined && fileId !== undefined) { if(error.code === 404) { error = 'File ID "' + fileId + '" does not exist on Google Drive.'; } else if(error.code === 412) { + // We may have missed a file update + localStorage.removeItem("sync.gdrive.lastChangeId"); error = 'Conflict on file ID "' + fileId + '". Please restart the synchronization.'; } } diff --git a/js/synchronizer.js b/js/synchronizer.js index a84d906b..9a5cd338 100644 --- a/js/synchronizer.js +++ b/js/synchronizer.js @@ -218,9 +218,6 @@ define(["jquery", "google-helper", "dropbox-helper"], function($, googleHelper, localStorage[fileSyncIndex + ".etag"] = file.etag; localStorage[fileSyncIndex + ".contentCRC"] = core.crc32(file.content); localStorage[fileSyncIndex + ".titleCRC"] = core.crc32(file.title); - - // Synchronize file with others locations - uploadPending = true; // may be unnecessary since syncUp checks content changes } if(updateFileTitles) { fileManager.updateFileTitles(); @@ -289,9 +286,6 @@ define(["jquery", "google-helper", "dropbox-helper"], function($, googleHelper, // Update file version and CRC localStorage[fileSyncIndex + ".version"] = file.versionTag; localStorage[fileSyncIndex + ".contentCRC"] = core.crc32(file.content); - - // Synchronize file with others locations - uploadPending = true; // may be unnecessary since syncUp checks every changes } if(updateFileTitles) { fileManager.updateFileTitles();