Display a more informative message when attempting media op without folder

This commit is contained in:
Damien Elmes 2023-05-18 10:48:25 +10:00
parent 19b08eb280
commit cff613bfef

View File

@ -43,6 +43,9 @@ impl MediaManager {
P2: AsRef<Path>,
{
let media_folder = media_folder.into();
if media_folder.as_os_str().is_empty() {
invalid_input!("attempted media operation without media folder set");
}
create_dir_all(&media_folder)?;
Ok(MediaManager {
db: MediaDatabase::new(media_db.as_ref())?,