allow the versions to not exist
This commit is contained in:
11
src/main.rs
11
src/main.rs
@@ -1189,7 +1189,14 @@ async fn download_creations_pages_from_checkpoint(context:&CookieContext,owner:r
|
||||
tokio::fs::read(versions_path.as_path()),
|
||||
tokio::fs::read_to_string(cursor_path.as_path()),
|
||||
);
|
||||
let versions=versions?;
|
||||
// allow versions to not exist
|
||||
let versions=match versions{
|
||||
Ok(versions)=>serde_json::from_slice(&versions)?,
|
||||
Err(e)=>match e.kind(){
|
||||
std::io::ErrorKind::NotFound=>Vec::new(),
|
||||
_=>Err(e)?,
|
||||
}
|
||||
};
|
||||
// allow the cursor to not exist
|
||||
let cursor=match cursor{
|
||||
Ok(cursor)=>Some(cursor),
|
||||
@@ -1199,7 +1206,7 @@ async fn download_creations_pages_from_checkpoint(context:&CookieContext,owner:r
|
||||
}
|
||||
};
|
||||
(
|
||||
serde_json::from_slice(&versions)?,
|
||||
versions,
|
||||
rbx_asset::cookie::CreationsPageRequest{
|
||||
owner,
|
||||
cursor,
|
||||
|
||||
Reference in New Issue
Block a user