diff --git a/core/util/paths.ts b/core/util/paths.ts index 5c0e225e8..cc1f56424 100644 --- a/core/util/paths.ts +++ b/core/util/paths.ts @@ -27,7 +27,11 @@ export function getSessionFilePath(sessionId: string): string { } export function getSessionsListPath(): string { - return path.join(getSessionsFolderPath(), "sessions.json"); + const filepath = path.join(getSessionsFolderPath(), "sessions.json"); + if (!fs.existsSync(filepath)) { + fs.writeFileSync(filepath, JSON.stringify([])); + } + return filepath; } export function getConfigJsonPath(): string {