Skip to content

Commit

Permalink
fix autostart flag �
Browse files Browse the repository at this point in the history
  • Loading branch information
makindotcc committed Jun 23, 2023
1 parent 73b9917 commit 466ca24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fn main() {
let app_path = app_path.to_str().expect("Empty current exe path");
let auto_launch = AutoLaunch::new("Moonish", &app_path, &[AUTOSTART_ARG] as &[&str]);

if env::args().next() == Some(String::from(AUTOSTART_ARG)) {
if env::args().skip(1).next() == Some(String::from(AUTOSTART_ARG)) {
println!("Started from autostart.");
env::set_current_dir(app_dir).expect("Could not set current working directory.");
}
Expand Down

0 comments on commit 466ca24

Please sign in to comment.