Fix: GC craches on startup

The existens of texture_base_path must be checked!
This commit is contained in:
CodeSteak 2019-06-02 20:48:29 +02:00
parent 0b7cf9c7cd
commit ec9c6888fc

View File

@ -191,8 +191,14 @@ impl DataStore {
None None
} }
} }
let texture_base_path = self.texture_base_path();
let texture_dir = std::fs::read_dir(self.texture_base_path())?; if !texture_base_path.exists() {
println!("No Textures Found: Skip GC.");
return Ok(());
}
let texture_dir = std::fs::read_dir(texture_base_path)?;
let mut hashs_on_disk = HashSet::new(); let mut hashs_on_disk = HashSet::new();
for result_direntry in texture_dir { for result_direntry in texture_dir {