mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-03 08:53:36 +00:00
refactor: Address PR review feedback for symlink and directory handling
- Use lstatSync with try/catch for robust broken symlink detection - Remove redundant existsSync check before mkdirSync with recursive: true Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -752,9 +752,7 @@ export function electronUserDataWriteFileSync(
|
||||
const fullPath = path.join(electronUserDataPath, relativePath);
|
||||
// Ensure parent directory exists (may not exist on first launch)
|
||||
const dir = path.dirname(fullPath);
|
||||
if (!fsSync.existsSync(dir)) {
|
||||
fsSync.mkdirSync(dir, { recursive: true });
|
||||
}
|
||||
fsSync.mkdirSync(dir, { recursive: true });
|
||||
fsSync.writeFileSync(fullPath, data, options);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user