unify path errors
This commit is contained in:
parent
00f6225791
commit
576d0d62bd
@ -578,10 +578,9 @@ impl PlayoutConfig {
|
||||
if !global.storage_path.is_dir() {
|
||||
tokio::fs::create_dir_all(&global.storage_path)
|
||||
.await
|
||||
.expect(&format!(
|
||||
"Can't create storage folder: {:#?}",
|
||||
global.storage_path
|
||||
));
|
||||
.unwrap_or_else(|_| {
|
||||
panic!("Can't create storage folder: {:#?}", global.storage_path)
|
||||
});
|
||||
}
|
||||
|
||||
let mut storage = Storage::new(&config, global.storage_path.clone());
|
||||
@ -594,13 +593,17 @@ impl PlayoutConfig {
|
||||
if !global.playlist_path.is_dir() {
|
||||
tokio::fs::create_dir_all(&global.playlist_path)
|
||||
.await
|
||||
.expect("Can't create playlist folder");
|
||||
.unwrap_or_else(|_| {
|
||||
panic!("Can't create playlist folder: {:#?}", global.playlist_path)
|
||||
});
|
||||
}
|
||||
|
||||
if !global.logging_path.is_dir() {
|
||||
tokio::fs::create_dir_all(&global.logging_path)
|
||||
.await
|
||||
.expect("Can't create logging folder");
|
||||
.unwrap_or_else(|_| {
|
||||
panic!("Can't create logging folder: {:#?}", global.logging_path)
|
||||
});
|
||||
}
|
||||
|
||||
let (filler_path, _, _) = norm_abs_path(&global.storage_path, &config.storage_filler)
|
||||
|
Loading…
Reference in New Issue
Block a user