check if texture is file before deletion in GC
This commit is contained in:
parent
92b053769a
commit
a2089dbd92
|
@ -217,7 +217,15 @@ impl DataStore {
|
|||
|
||||
let mut hashs_on_disk = HashSet::new();
|
||||
for result_direntry in texture_dir {
|
||||
let texture_path = result_direntry?.path();
|
||||
let result_direntry = result_direntry?;
|
||||
|
||||
// Skip if not a file.
|
||||
if !result_direntry.file_type()?.is_file() {
|
||||
continue;
|
||||
}
|
||||
|
||||
let texture_path = result_direntry.path();
|
||||
|
||||
let filename = match texture_path.file_name() {
|
||||
Some(name) => name,
|
||||
None => continue,
|
||||
|
|
Loading…
Reference in New Issue