Skip to content

Commit

Permalink
Fix bug in open_url()
Browse files Browse the repository at this point in the history
  • Loading branch information
0x192 committed Jan 30, 2022
1 parent 280447c commit 2ac4a43
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/core/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,10 @@ pub fn setup_uad_dir(dir: Option<PathBuf>) -> PathBuf {

pub fn open_url(dir: PathBuf) {
#[cfg(target_os = "windows")]
Command::new("explorer")
.args([dir])
.creation_flags(0x08000000)
.output();
let output = Command::new("explorer").args([dir]).output();

#[cfg(target_os = "macos")]
Command::new("open").args([dir]).output();
let output = Command::new("open").args([dir]).output();

#[cfg(not(any(target_os = "macos", target_os = "windows")))]
let output = Command::new("xdg-open").args([dir]).output();
Expand Down

0 comments on commit 2ac4a43

Please sign in to comment.