mirror of
https://github.com/openai/codex.git
synced 2026-04-27 08:05:51 +00:00
fix: make sure file exist in find_thread_path_by_id_str_in_subdir (#10618)
This commit is contained in:
@@ -104,9 +104,11 @@ async fn find_prefers_sqlite_path_by_id() {
|
||||
let home = TempDir::new().unwrap();
|
||||
let id = Uuid::new_v4();
|
||||
let thread_id = ThreadId::from_string(&id.to_string()).unwrap();
|
||||
let db_path = home
|
||||
.path()
|
||||
.join("sessions/2030/12/30/rollout-2030-12-30T00-00-00-db.jsonl");
|
||||
let db_path = home.path().join(format!(
|
||||
"sessions/2030/12/30/rollout-2030-12-30T00-00-00-{id}.jsonl"
|
||||
));
|
||||
std::fs::create_dir_all(db_path.parent().unwrap()).unwrap();
|
||||
std::fs::write(&db_path, "").unwrap();
|
||||
write_minimal_rollout_with_id(home.path(), id);
|
||||
upsert_thread_metadata(home.path(), thread_id, db_path.clone()).await;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user