Ready to implement network routes contents

This commit is contained in:
2023-12-04 20:16:32 +01:00
parent 0e3945089c
commit e579a3aadd
16 changed files with 523 additions and 46 deletions

View File

@ -149,7 +149,14 @@ impl AppConfig {
/// Get root storage directory
pub fn storage_path(&self) -> PathBuf {
Path::new(&self.storage).canonicalize().unwrap()
let storage_path = Path::new(&self.storage);
if !storage_path.is_dir() {
panic!(
"Specified storage path ({}) is not a directory!",
self.storage
);
}
storage_path.canonicalize().unwrap()
}
/// Get iso storage directory