Skip to content

Only call tryChosenFile when a file was actually saved in the settings - #2860

Merged
dbarashev merged 1 commit into
bardsoftware:masterfrom
Natalie-the-technician:i8-c-nachtrag
Oct 15, 2026
Merged

dbarashev merged 1 commit into
bardsoftware:masterfrom
Natalie-the-technician:i8-c-nachtrag

Conversation

@Natalie-the-technician

Copy link
Copy Markdown
Contributor

Follow-up to #2858, implementing what you suggested there: tryChosenFile is now only called when loadPreferences found 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.

…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.
@dbarashev
dbarashev merged commit 522cbe9 into bardsoftware:master Oct 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants