Repository navigation
Repair settings paths left behind by a moved tool folder - #3
Merged
Merged
Conversation
Each source stores its settings file by full path, so renaming the tool folder (BackupCenter -> DevDriveBackup) left a stale path and the app failed with "Cannot find path". When loading profiles, a missing settings path is now repointed to a file of the same name in the jobs folder or beside the profiles file, but only when that file describes the same source folder and plain copy folder. Unreadable or incomplete candidates are skipped. Tests cover the repair and the refusal of another source's file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
Each source stores its settings file by full path in
profiles.local.json. After the tool folder was renamed fromBackupCentertoDevDriveBackup, that path went stale and the app showed:Fix
Read-CenterProfilesnow repairs a missing settings path when profiles load. It looks for a file of the same name in the jobs folder or beside the profiles file and accepts it only when:SourceandMirrorFoldermatch this source.Unreadable or incomplete candidates are skipped, so loading never fails because of a candidate. The repaired path is saved.
Tests
Test-DevDriveBackup.ps1 -DestinationDrive G: new checks that a stale path is repaired and saved, and that a same-name file describing another source is not taken. Passed.{}candidate no longer breaks loading.Test-BackupStatus,Test-BackupThemeandTest-PrivacyGuardpassed. The app starts without an error dialog.🤖 Generated with Claude Code