fix download path
This commit is contained in:
parent
d6add611fb
commit
cbb5805d54
@ -445,7 +445,8 @@ async fn download_history(mut config:DownloadHistoryConfig)->AResult<()>{
|
||||
let client=client.clone();
|
||||
let cookie=cookie.clone();
|
||||
let asset_id_str=asset_id_str.clone();
|
||||
let output_folder=output_folder.clone();
|
||||
let mut path=output_folder.clone();
|
||||
path.push(format!("{}_v{}.rbxl",config.asset_id,version_number));
|
||||
join_set.spawn(async move{
|
||||
let resp=download_asset_version(&client,cookie.as_str(),asset_id_str.as_str(),version_number.to_string().as_str()).await?;
|
||||
let contents=match maybe_gzip_decode(std::io::Cursor::new(resp.bytes().await?))?{
|
||||
@ -453,9 +454,6 @@ async fn download_history(mut config:DownloadHistoryConfig)->AResult<()>{
|
||||
ReaderType::Raw(readable)=>read_readable(readable)?,
|
||||
};
|
||||
|
||||
let mut path=output_folder.clone();
|
||||
path.set_file_name(format!("{}_v{}.rbxl",config.asset_id,version_number));
|
||||
|
||||
tokio::fs::write(path,contents).await?;
|
||||
|
||||
Ok::<_,anyhow::Error>(())
|
||||
|
Loading…
Reference in New Issue
Block a user