mirror of
https://github.com/hesprs/obsidian-webdav-sync.git
synced 2026-07-22 06:14:17 +00:00
fix(decider): fix local_norecord_remote race condition (#168)
Fixes #166
This commit is contained in:
parent
79c44500f7
commit
ea9c7ca526
2 changed files with 7 additions and 12 deletions
|
|
@ -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.",
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue