Merge pull request #1579 from joshuamegnauth54/desktop-file-path-key
Respect 'Path' desktop entry key
This commit is contained in:
commit
fc32390f52
1 changed files with 6 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue