fix(decider): fix local_norecord_remote race condition (#168)

Fixes #166
This commit is contained in:
Hēsperus 2026-07-10 01:58:14 +08:00 committed by GitHub
parent 79c44500f7
commit ea9c7ca526
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 12 deletions

View file

@ -1,7 +1,7 @@
{
"id": "webdav-sync",
"name": "WebDAV Sync",
"version": "2.5.11",
"version": "2.5.12",
"minAppVersion": "1.12.3",
"authorUrl": "https://hesprs.github.io",
"description": "General-purpose & bidirectional WebDAV syncing for your vault. Designed for stability and robust file handling without vendor lock-in.",

View file

@ -146,17 +146,12 @@ export default function twoWayDecider(input: SyncDecisionInput): Array<BaseTask>
: 'RECORD_NOREMOTE_LOCAL_REMOVE';
}
} else if (remote)
if (local) {
localChanged = isChanged({
currentStats: localStats,
path,
records,
source: 'local',
});
caseName = localChanged
? 'NORECORD_REMOTE_LOCAL_RECORD'
: 'NORECORD_REMOTE_LOCAL_CONFLICT';
} else caseName = 'NORECORD_REMOTE_NOLOCAL_PULL';
if (local)
caseName =
local.size === remote.size
? 'NORECORD_REMOTE_LOCAL_RECORD'
: 'NORECORD_REMOTE_LOCAL_CONFLICT';
else caseName = 'NORECORD_REMOTE_NOLOCAL_PULL';
else if (local) caseName = 'NORECORD_NOREMOTE_LOCAL_PUSH';
const operations = {