Repository navigation
Only call tryChosenFile when a file was actually saved in the settings - #2860
Merged
dbarashev merged 1 commit intoOct 15, 2026
Merged
Conversation
…d before The multi-file list page (bardsoftware#2858) already skips validating files it never showed the user. A single-file page still called tryChosenFile() on its own proposed default, so a single-file importer (e.g. MS Project) could show "File does not exist" on the very first screen, before the user has picked anything, depending on the process's working directory. Per dbarashev's own suggestion on bardsoftware#2858: call tryChosenFile() only if loadPreferences() found a file previously saved in the settings. A file the user chose and saved before is still validated and reported if it has since gone missing.
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.
Follow-up to #2858, implementing what you suggested there:
tryChosenFileis now only called whenloadPreferencesfound a file that was previously saved in the settings; otherwise the page clears any stale error instead. This covers the case you pointed out — a single-file importer in a working directory where the proposed file does not exist, which used to show a "File does not exist" panel before the user had chosen anything.Added a regression test for the opposite direction too, so the error is still reported when a previously saved file has since gone missing.
Built on top of #2858's merge commit.