From 78650b1100ec32b63fbab2c4a4835cf944ac8023 Mon Sep 17 00:00:00 2001 From: dxrknesss Date: Sun, 28 Sep 2025 18:23:35 +0300 Subject: [PATCH] fix daemon working directory resolving to wrong path --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index d33d6a3..4234d78 100644 --- a/src/main.rs +++ b/src/main.rs @@ -30,8 +30,9 @@ fn main() { path }); + let current_exe_path = env::current_exe().unwrap().canonicalize().unwrap(); Daemonize::new() - .working_directory(env::current_dir().unwrap()) + .working_directory(current_exe_path.parent().unwrap()) .start() .unwrap();