LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust
Merge upstream/main
Andrew Frahn380d3017b0a9
diff --cc crates/ui-egui/src/menus.rsindex f759a9969,743bd4600..602e78fbc--- a/crates/ui-egui/src/menus.rs+++ b/crates/ui-egui/src/menus.rs@@@ -2008,15 -2325,20 +2327,22 @@@ fn edit_in_inner(app: &mut LightcraftApif let Some(id) = id {app.ui.external_edits.push(*id);}- if let Some(Err(e)) = app.services.open_with.as_mut().map(|f| f(path, &editor)) {- failed = Some(e);+ // the copy is LightCraft's own render, but it goes through the same gate as any other+ // path handed to the system opener (#2135)+ match lightcraft_engine::open_path::openable(path, "") {+ Err(e) => failed = Some(e),+ Ok(absolute) => {+ if let Some(Err(e)) = app.services.open_with.as_mut().map(|f| f(&absolute, &editor)) {+ failed = Some(e);+ }+ }}}- match (failed, copies.as_slice()) {- (Some(e), _) => app.toast(ctx, crate::i18n::tr_format!("Couldn't open the editor: {e}", e = e)),- (None, [(path, _)]) => {+ if let Some(e) = failed {+ return Err(e);+ }+ match copies.as_slice() {+ [(path, _)] => {let name = std::path::Path::new(path).file_name().map(|n| n.to_string_lossy().to_string()).unwrap_or_default();app.toast(ctx, crate::i18n::tr_format!("{name} opened for editing; it is stacked with the original", name = name));}