tsk-45: Added more checks

This commit is contained in:
2025-10-23 16:06:24 -04:00
parent ae8aaad068
commit cd6ee65318

View File

@@ -17,7 +17,17 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
if !app.does_root_directory_exists() {
eprintln!("Root directory does not exist");
std::process::exit(-1);
println!("Attempting to create directory");
let path = std::path::Path::new(&app.root_directory);
match std::fs::create_dir(&path) {
Ok(_) => {
println!("Directory created");
}
Err(err) => {
eprintln!("Error creating directory: {err:?}");
std::process::exit(-1);
}
}
}
app.token = match auth::get_token(&app).await {