File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ use crate::{injector, samp};
88
99#[ derive( Default ) ]
1010pub struct AppState {
11- storage_file : PathBuf ,
11+ pub storage_file : PathBuf ,
1212}
1313
1414#[ tauri:: command]
Original file line number Diff line number Diff line change @@ -10,9 +10,11 @@ mod rpcs;
1010mod samp;
1111
1212use std:: env;
13+ use std:: path:: PathBuf ;
1314use std:: process:: exit;
1415use std:: sync:: Mutex ;
1516
17+ use commands:: AppState ;
1618use gumdrop:: Options ;
1719use injector:: run_samp;
1820use log:: { error, LevelFilter } ;
@@ -117,6 +119,12 @@ Options:
117119 } ) ;
118120
119121 match tauri:: Builder :: default ( )
122+ . manage ( AppState {
123+ storage_file : PathBuf :: from ( format ! (
124+ "{}/com.open.mp/storage.json" ,
125+ dirs_next:: data_local_dir( ) . unwrap( ) . to_str( ) . unwrap( )
126+ ) ) ,
127+ } )
120128 . plugin ( tauri_plugin_upload:: init ( ) )
121129 . setup ( |app| {
122130 let handle = app. handle ( ) ;
You can’t perform that action at this time.
0 commit comments