tsk-72: Separating directory and filename from path in coverart #74

Merged
phoenix merged 9 commits from tsk-72 into next-v0.8 2025-10-19 00:48:50 +00:00
Showing only changes of commit fb554251f9 - Show all commits

View File

@@ -31,16 +31,14 @@ impl CoverArt {
/// Saves the coverart to the filesystem /// Saves the coverart to the filesystem
pub fn save_to_filesystem(&self) -> Result<(), std::io::Error> { pub fn save_to_filesystem(&self) -> Result<(), std::io::Error> {
match self.get_path() { match self.get_path() {
Ok(path) => { Ok(path) => match std::fs::File::create(&path) {
match std::fs::File::create(&path) { Ok(mut file) => match file.write_all(&self.data) {
Ok(mut file) => match file.write_all(&self.data) { Ok(_) => Ok(()),
Ok(_) => Ok(()),
Err(err) => Err(err),
},
Err(err) => Err(err), Err(err) => Err(err),
} },
} Err(err) => Err(err),
Err(err) => Err(err) },
Err(err) => Err(err),
} }
} }
@@ -60,7 +58,7 @@ impl CoverArt {
)) ))
} }
} }
Err(err) => Err(err) Err(err) => Err(err),
} }
} }
@@ -105,7 +103,7 @@ pub mod io {
Err(err) => Err(err), Err(err) => Err(err),
} }
} }
Err(err) => Err(err) Err(err) => Err(err),
} }
} }
} }