This commit is contained in:
ByteDream 2023-03-23 01:17:41 +01:00
parent 90212c4ec0
commit 0a40f3c40f
30 changed files with 3651 additions and 2982 deletions

View file

@ -37,7 +37,7 @@ pub fn tempfile<S: AsRef<str>>(suffix: S) -> io::Result<NamedTempFile> {
/// Check if the given path exists and rename it until the new (renamed) file does not exist.
pub fn free_file(mut path: PathBuf) -> (PathBuf, bool) {
// if it's a special file does not rename it
// do not rename it if it exists but is a special file
if is_special_file(&path) {
return (path, false);
}