diff options
author | RaindropsSys <raindrops@equestria.dev> | 2024-05-10 20:55:50 +0200 |
---|---|---|
committer | RaindropsSys <raindrops@equestria.dev> | 2024-05-10 20:55:50 +0200 |
commit | d24089826dced3c449e4c66518365fe7310f07ee (patch) | |
tree | 66e67da4282bc88718ed466e72b3be96830e75fe /launcher/src/main.rs | |
parent | bb207c5e012a5a74a0a7ab829b56f34dc9486366 (diff) | |
download | atomic-d24089826dced3c449e4c66518365fe7310f07ee.tar.gz atomic-d24089826dced3c449e4c66518365fe7310f07ee.tar.bz2 atomic-d24089826dced3c449e4c66518365fe7310f07ee.zip |
Crappy code fix 6/?
Diffstat (limited to 'launcher/src/main.rs')
-rw-r--r-- | launcher/src/main.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/launcher/src/main.rs b/launcher/src/main.rs index 3a961a0..93c996b 100644 --- a/launcher/src/main.rs +++ b/launcher/src/main.rs @@ -112,9 +112,8 @@ fn main() { show_system_info(); println!("atomic-launcher: Compiled against rustc {}", rustc_version_runtime::version()); - let exec_path = std::env::current_exe(); - let work_dir = exec_path.as_ref().map(|p| p.parent()).ok() - .unwrap_or(Some(Path::new("/"))) + let exec_path = std::env::current_exe().ok(); + let work_dir = exec_path.as_ref().and_then(|p| p.parent()) .unwrap_or(Path::new("/")); println!("atomic-launcher: Current directory: {}", work_dir |