Update lib.rs

pull/125/head
Fabian-Lars 2 years ago committed by GitHub
parent 137e22b794
commit b53e408a2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -115,13 +115,13 @@ pub fn init<R: Runtime>(
// but this results in seeing a Unix Executable in macOS login items // but this results in seeing a Unix Executable in macOS login items
// It must be: /Applications/Example.app // It must be: /Applications/Example.app
// If it didn't find exactly a single occurance of .app, it will default to // If it didn't find exactly a single occurance of .app, it will default to
// exe path to not break it.ß // exe path to not break it.
let exe_path = current_exe.canonicalize()?.display().to_string(); let exe_path = current_exe.canonicalize()?.display().to_string();
let parts: Vec<&str> = exe_path.split(".app/").collect(); let parts: Vec<&str> = exe_path.split(".app/").collect();
let app_path = if parts.len() == 2 { let app_path = if parts.len() == 2 {
format!( format!(
"{}{}", "{}{}",
parts.get(0).expect("to be an app").to_string(), parts.get(0).unwrap().to_string(),
".app" ".app"
) )
} else { } else {

Loading…
Cancel
Save