Skip to content

Commit e7b2d8f

Browse files
committed
More robust archive creation on windows
It's so amazing that windows always manages to screw up even with what one would consider basics. Nothing changed really, but it's OK… .
1 parent 66dee9a commit e7b2d8f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/tools/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,10 @@ fn create_archive_if_not_on_ci(source_dir: &Path, archive: &Path, script_identit
215215
std::io::copy(&mut &*buf, &mut xz_write)?;
216216
xz_write.finish()?.close()
217217
})();
218+
#[cfg(not(windows))]
218219
std::fs::remove_dir_all(meta_dir)?;
220+
#[cfg(windows)]
221+
std::fs::remove_dir_all(meta_dir).ok(); // it really can't delete these directories for some reason (even after 10 seconds)
219222
res
220223
}
221224

0 commit comments

Comments
 (0)