Merge pull request #1579 from joshuamegnauth54/desktop-file-path-key

Respect 'Path' desktop entry key
This commit is contained in:
Levi Portenier 2026-02-13 15:14:17 -07:00 committed by GitHub
commit fc32390f52
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -865,7 +865,13 @@ impl App {
Ok(entry) => match entry.exec() {
Some(exec) => match mime_app::exec_to_command(exec, &[] as &[&str; 0]) {
Some(commands) => {
let cwd_opt = entry.desktop_entry("Path");
for mut command in commands {
if let Some(cwd) = cwd_opt {
command.current_dir(cwd);
}
if let Err(err) = spawn_detached(&mut command) {
log::warn!("failed to execute {}: {}", path.display(), err);
}