Repository navigation
Autosave falls back to a per-user folder when the project's folder can't be written (#37) - #226
Merged
Merged
Conversation
…der can't be written (#37) On a location failure (no access, missing folder, write-protected volume) the autosave tick writes its recovery copy, with generations, to %LOCALAPPDATA%\PillarsDialogEditor\autosave, keyed by a hash of the full project path, and says so once in the status bar. Check consults both places and offers the newer copy; the restore dialog says where a fallback copy came from; save and discard sweep both places. 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.
Closes #37.
Change
AutosaveRecovery:%LOCALAPPDATA%\PillarsDialogEditor\autosave\<file name>.<16-hex hash of the full path>.autosave, plus generations. The hash ignores path casing, and two projects with the same file name don't collide.IsLocationFailuredecides when to fall back:UnauthorizedAccessException,DirectoryNotFoundException, or a write-protected volume (0x80070013). A sharing violation doesn't count, since that's a passing moment rather than the location.Checklooks next to the project and in the fallback folder, and returns the newer copy (IsFallbacksays which).TryDeletesweeps every generation in both places, so central copies don't pile up.MainWindowViewModel.AutosaveTick:Status_AutosaveFallbackandAutosaveRestore_FromFallback, inStrings.axaml.Tests
AutosaveFallbackTests(16 cases): the path, keying, casing, generations,Checkchoosing the newer copy, a stale fallback copy, deletion sweeping both places, rotation, and the exception classification.MainWindowViewModelAutosaveTests:UnauthorizedAccessException; the serializer creates missing folders, so a missing folder doesn't work. With the fallback disabled, both tick tests fail.🤖 Generated with Claude Code