Fix: force refresh of remote tree on precalculation and replace relative with the custom relative on create backup upload executor - #305
Merged
AlexisMora merged 2 commits intoApr 9, 2026
Conversation
…ive with the custom relative on create backup upload executor
|
egalvis27
approved these changes
Apr 9, 2026
AlexisMora
deleted the
fix/force-remote-refresh-on-precalculation__use-custom-relative
branch
April 9, 2026 13:59
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.



What is Changed / Added
create-backup-upload-executor.ts: Changed the relative import fromnode:pathto the project's custom relative utilityapps/backups/utils/relative. Node's relative produces paths without a leading/for examplesub1/file.txt, while theRemoteTreekeys folders with a leading/for example:/sub1. This mismatch causedremoteTree.getParent()to throw when looking up parent folders for file uploads, silently aborting the async queue.precalculate-backup-item-count.ts: AddedforceRefresh: trueto theremoteTreeBuilder.run()call so the remote tree is always fetched fresh before precalculating item counts.Why
The original sequential upload code used the custom relative utility, but the new
create-backup-upload-executor.tsimported relative fromnode:path. This caused backups of folders with subfolders to create the folder structure correctly but skip all file uploads and making the parent lookup failed becausesub1!=/sub1, the error was unhandled inside the async queue, and the queue silently stopped processing.The
forceRefreshchange ensures that repeated manual backups always diff against the latest remote state, preventing stale tree data from causing unnecessary 409 conflicts or incorrect diff calculations.