From 698c30313f0b2874e5a8b8d657b48e0df28b6b91 Mon Sep 17 00:00:00 2001 From: Esmodea Date: Thu, 18 Sep 2025 16:01:02 -0500 Subject: [PATCH] Updated boolean for non-deletion cases in SyncManager determineSyncActions method --- src/sync-manager.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sync-manager.ts b/src/sync-manager.ts index da11a5a..f48638b 100644 --- a/src/sync-manager.ts +++ b/src/sync-manager.ts @@ -724,12 +724,12 @@ export default class SyncManager { } } - // For non-deletion cases, if SHAs differ, we just need to check if local changed. + // For non-deletion cases, if SHAs differ, we need to check if local changed and what file was modified last // Conflicts are already filtered out so we can make this decision easily - if (localSHA !== localFile.sha) { + if (localSHA !== localFile.sha && remoteFile.lastModified < localFile.lastModified) { actions.push({ type: "upload", filePath: filePath }); return; - } else { + } else if(localSHA == localFile.sha && remoteFile.lastModified > localFile.lastModified) { actions.push({ type: "download", filePath: filePath }); return; }