fix: remove file after copy

This commit is contained in:
Kyle Clemens 2018-08-13 19:51:24 -04:00
parent efb18c8394
commit 8f1d067f2c
Signed by: anna
GPG Key ID: 0B391D8F06FCD9E0

View File

@ -86,6 +86,7 @@ impl Job {
match std::fs::rename(&f, &file_path) {
Err(ref e) if cfg!(windows) && e.raw_os_error() == Some(17) => {
std::fs::copy(&f, &file_path)?;
std::fs::remove_file(&f)?;
},
_ => {},
}