fix: remove Unix file metadata usage (Windows compatibility)
This commit is contained in:
parent
98e9037e7a
commit
40416cf2ad
1 changed files with 1 additions and 2 deletions
|
|
@ -10,7 +10,6 @@ use std::{
|
||||||
cmp::Ordering,
|
cmp::Ordering,
|
||||||
ffi::OsString,
|
ffi::OsString,
|
||||||
ops::Range,
|
ops::Range,
|
||||||
os::unix::fs::MetadataExt,
|
|
||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
sync::Arc,
|
sync::Arc,
|
||||||
time::Duration,
|
time::Duration,
|
||||||
|
|
@ -1269,7 +1268,7 @@ async fn download_single_file(
|
||||||
if let Err(e) = res {
|
if let Err(e) = res {
|
||||||
// Remove temporary file if nothing was downloaded (e.g. 403 error)
|
// Remove temporary file if nothing was downloaded (e.g. 403 error)
|
||||||
if std::fs::metadata(&output_path_tmp)
|
if std::fs::metadata(&output_path_tmp)
|
||||||
.map(|md| md.size() == 0)
|
.map(|md| md.len() == 0)
|
||||||
.unwrap_or_default()
|
.unwrap_or_default()
|
||||||
{
|
{
|
||||||
_ = std::fs::remove_file(&output_path_tmp);
|
_ = std::fs::remove_file(&output_path_tmp);
|
||||||
|
|
|
||||||
Reference in a new issue