should be create
This commit is contained in:
parent
95673eab1c
commit
4bddfaa0fa
@ -162,9 +162,9 @@ impl Downloader {
|
|||||||
out_path.push(filename);
|
out_path.push(filename);
|
||||||
|
|
||||||
if !out_path.exists() {
|
if !out_path.exists() {
|
||||||
let mut res = reqwest::get(url).expect("failed to download url");
|
let mut result = reqwest::get(url).expect("failed to download url");
|
||||||
let mut file = File::open(out_path.as_path()).expect("failed to open file");
|
let mut file = File::create(out_path.as_path()).expect("failed to open file");
|
||||||
copy(&mut res, &mut file).expect("failed to write file");
|
copy(&mut result, &mut file).expect("failed to write file");
|
||||||
}
|
}
|
||||||
|
|
||||||
out_path
|
out_path
|
||||||
|
Loading…
x
Reference in New Issue
Block a user