diff --git a/crates/ui-egui/src/file_browser.rs b/crates/ui-egui/src/file_browser.rs index 2a386b16f9..965b8a06d9 100644 --- a/crates/ui-egui/src/file_browser.rs +++ b/crates/ui-egui/src/file_browser.rs @@ -878,6 +878,8 @@ mod tests { // The appended name already exists: the system dialog never confirmed it, so refuse. let bare = dir.join("letter").to_string_lossy().into_owned(); assert!(a.finish_pick(AfterPick::Export { ext: "xml".into() }, Some(bare)).is_err()); + let said = a.status_msg.as_ref().map(|(m, _)| m.clone()).unwrap_or_default(); + assert!(said.contains("letter.xml already exists"), "the refusal is on the status bar: {said:?}"); let _ = std::fs::remove_dir_all(&dir); } diff --git a/crates/ui-egui/src/file_dialogs.rs b/crates/ui-egui/src/file_dialogs.rs index 73b16d9c19..17e90a92ce 100644 --- a/crates/ui-egui/src/file_dialogs.rs +++ b/crates/ui-egui/src/file_dialogs.rs @@ -310,7 +310,10 @@ impl WordApp { path.push_str(".xml"); // The dialog only confirmed the name it was given, not this one. if std::path::Path::new(&path).exists() { - return Err(format!("{path} already exists; choose another name")); + // Callers drop the result, so say it where the person sees it. + let msg = format!("{path} already exists; choose another name"); + self.status(msg.clone()); + return Err(msg); } } // Word XML even over a Word 2003 XML file, which a save by path would keep.