You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// There are edge cases where completely empty directories are created and can't be deleted. They get registered as "unknown" path type so we need to check if the path has an extension (which would tell us if it's a file or a directory), and if it doesn't, we delete it as a directory
35
-
let _ = fs::remove_dir(&path);// this can fail silently, but we don't care since there also might be cases where a file literally doesn't exist
38
+
}elseif path.extension().is_none(){
39
+
// There are edge cases where completely empty directories are created and can't be deleted. They get
40
+
// registered as "unknown" path type so we need to check if the path has an extension (which would tell us
41
+
// if it's a file or a directory), and if it doesn't, we delete it as a directory
42
+
let _ = fs::remove_dir(&path);// this can fail silently, but we don't care since there also might be cases
43
+
// where a file literally doesn't exist
36
44
}
37
45
}
38
46
// Check if the directory is empty. If it is, delete it
0 commit comments