linux: fix reveal_path for files (#8162)
Fixes 'Reveal in Finder' opening files instead of showing them in the file explorer. Tested on Fedora KDE 39. Release Notes: - N/A
This commit is contained in:
parent
946f4a312a
commit
40bbd0031d
1 changed files with 7 additions and 1 deletions
|
@ -294,7 +294,13 @@ impl Platform for LinuxPlatform {
|
|||
}
|
||||
|
||||
fn reveal_path(&self, path: &Path) {
|
||||
if path.is_dir() {
|
||||
open::that(path);
|
||||
return;
|
||||
}
|
||||
// If `path` is a file, the system may try to open it in a text editor
|
||||
let dir = path.parent().unwrap_or(Path::new(""));
|
||||
open::that(dir);
|
||||
}
|
||||
|
||||
fn on_become_active(&self, callback: Box<dyn FnMut()>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue