Skip to content

Commit

Permalink
Fixed bug with missing data directory
Browse files Browse the repository at this point in the history
  • Loading branch information
raphtlw committed Jan 28, 2022
1 parent 91dcd64 commit 2a47bbb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ impl GlobalPaths {
res_jre: None,
};

if !paths.app_data_dir.exists() {
log::debug!("Data directory does not exist, creating...");
fs_extra::dir::create_all(app_data_dir, false).unwrap();
}

paths.set_optional().unwrap();
PATHS.set(paths.clone()).unwrap();

Expand Down

0 comments on commit 2a47bbb

Please sign in to comment.