Compare commits

..

4 Commits

Author SHA1 Message Date
c79a2cf98e tsk-45: Code formatting
Some checks failed
Rust Build / Check (pull_request) Successful in 38s
Rust Build / Test Suite (pull_request) Successful in 37s
Rust Build / Rustfmt (pull_request) Successful in 29s
Rust Build / Clippy (pull_request) Failing after 37s
Rust Build / build (pull_request) Successful in 43s
2025-10-23 16:06:50 -04:00
cd6ee65318 tsk-45: Added more checks 2025-10-23 16:06:24 -04:00
ae8aaad068 tsk-45: Version bump 2025-10-23 15:57:17 -04:00
7e50c30e06 tsk-45: Added root directory check 2025-10-23 15:56:50 -04:00
2 changed files with 6 additions and 2 deletions

View File

@@ -9,7 +9,11 @@ pub struct App {
impl App { impl App {
pub fn does_root_directory_exists(&self) -> bool { pub fn does_root_directory_exists(&self) -> bool {
let path = std::path::Path::new(&self.root_directory); let path = std::path::Path::new(&self.root_directory);
if path.exists() { path.is_dir() } else { false } if path.exists() {
if path.is_dir() { true } else { false }
} else {
false
}
} }
} }

View File

@@ -19,7 +19,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
eprintln!("Root directory does not exist"); eprintln!("Root directory does not exist");
println!("Attempting to create directory"); println!("Attempting to create directory");
let path = std::path::Path::new(&app.root_directory); let path = std::path::Path::new(&app.root_directory);
match std::fs::create_dir(path) { match std::fs::create_dir(&path) {
Ok(_) => { Ok(_) => {
println!("Directory created"); println!("Directory created");
} }