From 10c0e2f7efdc5deea2ffa21f29c87c2327e847a6 Mon Sep 17 00:00:00 2001 From: Salem Yaslem Date: Mon, 22 Feb 2021 18:11:16 +0300 Subject: [PATCH] absolute path for po --- src/main.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 5c11cf8..cc28582 100644 --- a/src/main.rs +++ b/src/main.rs @@ -47,10 +47,12 @@ fn main() { setlocale(LocaleCategory::LcAll, ""); bindtextdomain( "blue-recorder", - std::fs::canonicalize(Path::new("po")) - .unwrap() - .to_str() - .unwrap(), + { + let mut current_exec_dir = std::env::current_exe().unwrap(); + current_exec_dir.pop(); + current_exec_dir + } + .join(Path::new("po")).to_str().unwrap(), ); textdomain("blue-recorder");