Skip to content

Commit

Permalink
fix setup.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
thewh1teagle committed Dec 2, 2024
1 parent 5f7d668 commit 6d2dc44
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions desktop/src-tauri/src/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ pub fn setup(app: &App) -> Result<(), Box<dyn std::error::Error>> {
// Create app directories
let local_app_data_dir = app.path().app_local_data_dir()?;
let app_config_dir = app.path().app_local_data_dir()?;
fs::create_dir_all(local_app_data_dir).expect(&format!(
"cant create local app data directory at {}",
local_app_data_dir.display()
));
fs::create_dir_all(app_config_dir).expect(&format!("cant create app config directory at {}", app_config_dir.display()));
fs::create_dir_all(&local_app_data_dir)
.unwrap_or_else(|_| panic!("cant create local app data directory at {}", local_app_data_dir.display()));
fs::create_dir_all(&app_config_dir)
.unwrap_or_else(|_| panic!("cant create app config directory at {}", app_config_dir.display()));

// Manage model context
app.manage(Mutex::new(None::<ModelContext>));
Expand Down

0 comments on commit 6d2dc44

Please sign in to comment.