Fix potential error when deleting remote files in sync manager#28
Conversation
|
This isn't only with MacOS. Because i also get this when syncing between linux & android. However i hope that this gets accepted. Thank you for thanking your time to fix it (: |
|
+1 hoping this gets merged! Note there's a parallel error about "path" vs "sha" that I believe comes from calling downloadFile on undefined, but we could treat that separately and file a new issue for it if needed. It's not quite as common as the "undefined (setting sha)" one. |
|
@silvanocerza anything I can do to help get this PR merged? thanks |
|
FWIW I've moved to the FIT plugin instead, which is very similar but I found slightly less buggy. It does still have a few bugs like this, but I'm a co-maintainer on FIT now and have some changes nearly finished to finally fix it properly there. |
|
IM NOT THAT TECH SAVY BUT HOW TO SOLVE THIS ISSUE??? |
|
I recommend using FIT instead. |
- fix(sync): process ZIP entries sequentially to prevent memory exhaustion on large vaults during initial sync from remote (refs silvanocerza#24) - fix(sync): add null guard before setting sha on delete_remote tree item to prevent TypeError on mobile when file entry is missing (refs silvanocerza#52, silvanocerza#28) - fix(sync): use SHA as primary truth in determineSyncActions instead of timestamps, preventing files modified by plugins or external tools from being silently skipped on sync - fix(sync): correct inverted syncConfigDir condition in ZIP extraction that caused .obsidian folder to be skipped when config sync was enabled - fix(sync): auto-reconcile config dir files into metadata on loadMetadata when syncConfigDir is true, so users no longer need to toggle the setting after enabling it - fix(sync): recover from stale blob SHAs by falling back to current tree SHA on 404 responses, preventing sync failures after force-pushes (refs silvanocerza#58) - fix(sync): exclude volatile sync artifacts (github-sync.log) from metadata and conflict detection to prevent recurring false conflicts - fix(sync): reconcile remote metadata SHAs with live tree on each sync to remove stale references before conflict detection runs - fix(sync): add null guards on metadataStore.data.files before setting sha to prevent TypeError on new files not yet in local metadata
…a#29 mobile diff-group paste silvanocerza#28 — a diff-conflict was caught inside the plugin directory; only data.json should ever conflict there, the rest must change atomically. silvanocerza#29 — on mobile, copying a diff-group pastes plain text instead of the group (screenshot-mobile-10). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Fix sync error when deleting files on Android and syncing with macOS
Issue
Closes #21
When deleting files on Android and then syncing with github repo pushed from macOS, a sync error occurs as described in the linked issue.
Notes
There may be potential to remove the
.sha = nullsetting entirely, but the side effects are unclear for me.