Skip to content

File: Save a Copy asks where to save a bare name instead of writing it to the working directory - #1215

Merged
aiongg merged 1 commit into
storytold:mainfrom
marcoarnulfo:fix/web-page-export-output
Oct 22, 2026
Merged

aiongg merged 1 commit into
storytold:mainfrom
marcoarnulfo:fix/web-page-export-output

Conversation

@marcoarnulfo

Copy link
Copy Markdown
Contributor

Fixes #1212.

Share › Export as Web Page (and Save as Web Page in the native File menu) opens the small Save a Copy dialog, which asks for a name. A name typed there went straight to file.exportHtml as a relative path, so the page was written to the process's working directory: the install folder on Windows, / when launched from the Finder, wherever the launcher started it on Linux, never Documents or Downloads. Now a name without a folder goes to the save picker as its suggestion, so the user chooses where it lands; a full path is still written as typed, and an empty field opens the picker as before. Thanks to #394 and #641, which set up the HTML export and its error path; the export itself was fine.

#1213 looks like the same thing: its popup names a bare testcsvexport.csv, and Export as CSV goes through the same dialog, so on Windows the write hit the install folder and got "access denied". I haven't confirmed it on Windows, so I left that issue open.

Another option would be to drop the text field and have these menu entries open the picker directly, as File › Export already does; happy to switch if you prefer that.

Validation:

  • save_a_copy_with_a_bare_name_asks_where_to_save_it (crates/ui-egui/tests/file_menu.rs): fails on main (the page is written to the working directory and the picker is never asked), passes here; it also checks that a full path skips the picker and that a failed write is reported
  • cargo clippy -p gridcraft-ui-egui --all-targets -- -D warnings, cargo fmt --all -- --check
  • (macOS, Apple silicon)

@aiongg
aiongg merged commit 8319587 into storytold:main Oct 22, 2026
1 check 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.

Web Page export creates no output file after save dialog

2 participants