Conversation
A node deleted server-side becomes a permanent "ghost" in megajs's storage.files: the sc delete handler only unlinks parent.children, and reload() is purely additive (_importFile skips known handles). Since the provider enumerates from storage.files, a ghost volume-data.json made every sync fail: the download discarded the readable copy (Promise.all), and the pre-upload replace delete hit server ENOENT (-9) with a cache-refresh retry that could never evict the ghost. - reinitialize(): rebuild storage.files from an empty map so the reload mirrors the server exactly (evicts ghosts); restore the old tree on transient reload failure. Also strip the stacked api 'sc' listeners megajs re-attaches on every reload — double-processed delete packets splice(-1) and corrupt sibling arrays in long sessions. - uploadFile(): replace-all semantics (delete every same-name copy, not just the first) and treat a server "already gone" delete answer as converged instead of failing the upload. - downloadVolumeDataFile(): Promise.allSettled — merge the readable duplicates, skip not-found ghosts, keep the first readable copy, and tolerate NOT_FOUND when deleting the extras. Transient errors still propagate. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
adrian-tompkins
pushed a commit
to adrian-tompkins/mokuro-reader
that referenced
this pull request
Aug 2, 2026
fix: Add missing leading slash in WebDAV upload path
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hotfix release: MEGA ghost-node sync failure.
Fixed
A node deleted server-side became a permanent "ghost" in megajs's in-memory tree (its reload() is purely additive and its sc delete handler never evicts from storage.files), which made every subsequent sync fail with ENOENT (-9). See aab1965 for the full breakdown.
🤖 Generated with Claude Code