mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-09 17:40:44 -07:00
fix(core): ensure directory exists before writing conversation file (#18429)
Co-authored-by: godwiniheuwa <godwiniheuwa@users.noreply.github.com> Co-authored-by: ruintheextinct <deepkarma001@gmail.com>
This commit is contained in:
@@ -455,6 +455,8 @@ export class ChatRecordingService {
|
||||
conversation.lastUpdated = new Date().toISOString();
|
||||
const newContent = JSON.stringify(conversation, null, 2);
|
||||
this.cachedLastConvData = newContent;
|
||||
// Ensure directory exists before writing (handles cases where temp dir was cleaned)
|
||||
fs.mkdirSync(path.dirname(this.conversationFile), { recursive: true });
|
||||
fs.writeFileSync(this.conversationFile, newContent);
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user