fix(KB-601): fix atomicWriteTaskJson missing directory error
- Fix atomicWriteTaskJson to ensure parent directory exists before writing - Add changeset for unpause missing directory fix - Remove deprecated backup commands and related code - Clean up unused settings fields and API routes - Remove task comments and merge details components - Update store tests to reflect directory fix behavior
This commit is contained in:
@@ -398,6 +398,7 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
|
||||
const taskJsonPath = join(dir, "task.json");
|
||||
const tmpPath = join(dir, "task.json.tmp");
|
||||
this.suppressWatcher(taskJsonPath);
|
||||
await mkdir(dir, { recursive: true }); // Ensure directory exists
|
||||
await writeFile(tmpPath, JSON.stringify(task, null, 2));
|
||||
await rename(tmpPath, taskJsonPath);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user