mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-05 17:58:55 +00:00
safe delete
This commit is contained in:
1 parent
ff4a3115d2
commit
18ad28135f
1 file changed
+2
-1
@@ -4,6 +4,7 @@ use log::warn;
|
||||
|
||||
use collections::multiple_random_from_vec::multiple_random_from_vec;
|
||||
use errors::AnyhowResult;
|
||||
use filesys::safe_delete_temp_file::safe_delete_temp_file;
|
||||
use jobs_common::semi_persistent_cache_dir::SemiPersistentCacheDir;
|
||||
|
||||
pub fn clear_full_filesystem(cache_dir: &SemiPersistentCacheDir) -> AnyhowResult<()> {
|
||||
@@ -30,7 +31,7 @@ fn decimate_directory(path: &Path) -> AnyhowResult<()> {
|
||||
warn!("Deleting cached model file: {:?}", model_to_delete);
|
||||
|
||||
let full_model_path = path.join(model_to_delete);
|
||||
std::fs::remove_file(full_model_path)?;
|
||||
safe_delete_temp_file(full_model_path);
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in new issue
Block a user