fix(win): Fix crash on start on Windows

This commit is contained in:
Andreas Mieke 2023-11-16 01:13:05 +01:00
parent 676c922a3a
commit 78c2ac3459
3 changed files with 12 additions and 1 deletions

View file

@ -57,7 +57,7 @@ fn main() {
// Set config path config to home folder, or if provided to specified file
let config_path = if args.config.is_none() {
PathBuf::from(std::env::var("HOME").unwrap()).join(".plex-media-ingest").join("config.json")
PathBuf::from(home::home_dir().unwrap_or_default()).join(".plex-media-ingest").join("config.json")
} else {
args.config.unwrap()
};