fix: Update permissions for trustedFolders.json file to make it more … (#7685)

This commit is contained in:
shrutip90
2025-09-03 16:06:26 -07:00
committed by GitHub
parent 70900799d9
commit cfea46e9d8
2 changed files with 2 additions and 2 deletions

View File

@@ -169,7 +169,7 @@ describe('Trusted Folders Loading', () => {
expect(mockFsWriteFileSync).toHaveBeenCalledWith(
USER_TRUSTED_FOLDERS_PATH,
JSON.stringify({ '/new/path': TrustLevel.TRUST_FOLDER }, null, 2),
'utf-8',
{ encoding: 'utf-8', mode: 0o600 },
);
});
});

View File

@@ -150,7 +150,7 @@ export function saveTrustedFolders(
fs.writeFileSync(
trustedFoldersFile.path,
JSON.stringify(trustedFoldersFile.config, null, 2),
'utf-8',
{ encoding: 'utf-8', mode: 0o600 },
);
} catch (error) {
console.error('Error saving trusted folders file:', error);