Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
01c61c71d9 | |||
8e933111e4 |
@ -341,7 +341,13 @@ async fn download_list(cookie:String,asset_id_file_map:AssetIDFileMap)->AResult<
|
||||
.buffer_unordered(CONCURRENT_REQUESTS)
|
||||
.for_each(|b:AResult<_>|async{
|
||||
match b{
|
||||
Ok((dest,data))=>{
|
||||
Ok((mut dest,data))=>{
|
||||
//known file types
|
||||
match &data[0..4]{
|
||||
b"<rob"=>dest.set_extension("rbxm"),
|
||||
b"\x89PNG"=>dest.set_extension("png"),
|
||||
_=>false,
|
||||
};
|
||||
match tokio::fs::write(dest,data).await{
|
||||
Err(e)=>eprintln!("fs error: {}",e),
|
||||
_=>(),
|
||||
|
Loading…
Reference in New Issue
Block a user