Updated boolean for non-deletion cases in SyncManager determineSyncActions method

This commit is contained in:
Esmodea 2025-09-18 16:01:02 -05:00
parent 2ebd201da9
commit 698c30313f

View file

@ -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;
}