From fa35469ca9ecc1861c19961cbcbf3e26c7d4fb95 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Thu, 18 Jul 2024 16:16:50 -0400 Subject: [PATCH] When server and client clocks are out of sync, warn the user that they should update mod times even if the pending upload operations appear correct --- src/sync/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sync/client.go b/src/sync/client.go index 86348aa..76f4df5 100644 --- a/src/sync/client.go +++ b/src/sync/client.go @@ -342,7 +342,7 @@ func syncLists(localEntryModMap, remoteEntryModMap map[string]int64, manualSync timeDiff := serverTime - clientTime if timeDiff < -45 || timeDiff > 45 { timeSynced = false - fmt.Print(backend.AnsiError + "Client and server times are out of sync.\n\nPlease ensure both clocks are correct before attempting to sync again.\n\nA dry sync output will be printed below (if any operations would have been performed). It is strongly recommended to review it and manually update the modification times as applicable to ensure the correct version of each entry is kept.\n\n" + backend.AnsiReset) + fmt.Print(backend.AnsiError + "Client and server clocks are out of sync.\n\nPlease ensure both clocks are correct before attempting to sync again.\n\nA dry sync output will be printed below (if any operations would have been performed). It is strongly recommended to review it and manually update the modification times as applicable to ensure the correct version of each entry is kept.\n\nIf the client's clock is at fault, update the modification times of any entries pending upload, even if the correct (upload) operation is being performed on them. Failure to do so could result in entries being uploaded to the server with the incorrect modification times (could result in data loss).\n\n" + backend.AnsiReset) } // iterate over client entries