allow the versions to not exist

This commit is contained in:
2025-08-25 18:32:47 -07:00
parent 04d5592aaf
commit 89da9108c2

View File

@@ -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(versions_path.as_path()),
tokio::fs::read_to_string(cursor_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 // allow the cursor to not exist
let cursor=match cursor{ let cursor=match cursor{
Ok(cursor)=>Some(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{ rbx_asset::cookie::CreationsPageRequest{
owner, owner,
cursor, cursor,