Skip to content

Commit 5baad4d

Browse files
committed
Changed
1 parent ed1dabf commit 5baad4d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

game_controller_app/src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
windows_subsystem = "windows"
66
)]
77

8+
use std::env::current_exe;
9+
810
use clap::Parser;
911
use tauri::{async_runtime, generate_context, Manager, RunEvent, WebviewUrl, WebviewWindowBuilder};
1012

@@ -34,10 +36,8 @@ fn main() {
3436

3537
let app = tauri::Builder::default()
3638
.setup(|app| {
37-
// TODO: This will probably not work in production.
38-
let config_directory = app
39-
.path()
40-
.resource_dir()
39+
let config_directory = current_exe()?
40+
.parent()
4141
.unwrap()
4242
.join("..")
4343
.join("..")

0 commit comments

Comments
 (0)