mirror of
https://github.com/thegeneralist01/archivr
synced 2026-05-30 08:36:47 +02:00
fix: use remove_dir_all for removal of temp directories
Signed-off-by: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com>
This commit is contained in:
parent
2d59ab0af5
commit
9441a9d9fb
1 changed files with 2 additions and 2 deletions
|
|
@ -350,7 +350,7 @@ fn main() -> Result<()> {
|
||||||
// Dir or whatever. it's midnight and my brain ain't wording/braining.
|
// Dir or whatever. it's midnight and my brain ain't wording/braining.
|
||||||
if hash_exists {
|
if hash_exists {
|
||||||
println!("File already archived.");
|
println!("File already archived.");
|
||||||
let _ = fs::remove_file(store_path.join("temp").join(×tamp));
|
let _ = fs::remove_dir_all(store_path.join("temp").join(×tamp));
|
||||||
} else {
|
} else {
|
||||||
move_temp_to_raw(
|
move_temp_to_raw(
|
||||||
&store_path
|
&store_path
|
||||||
|
|
@ -360,7 +360,7 @@ fn main() -> Result<()> {
|
||||||
&hash,
|
&hash,
|
||||||
&store_path,
|
&store_path,
|
||||||
)?;
|
)?;
|
||||||
let _ = fs::remove_file(store_path.join("temp").join(×tamp));
|
let _ = fs::remove_dir_all(store_path.join("temp").join(×tamp));
|
||||||
|
|
||||||
println!("File archived successfully.");
|
println!("File archived successfully.");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue