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
@@ -169,7 +169,7 @@ describe('Trusted Folders Loading', () => {
expect(mockFsWriteFileSync).toHaveBeenCalledWith( expect(mockFsWriteFileSync).toHaveBeenCalledWith(
USER_TRUSTED_FOLDERS_PATH, USER_TRUSTED_FOLDERS_PATH,
JSON.stringify({ '/new/path': TrustLevel.TRUST_FOLDER }, null, 2), JSON.stringify({ '/new/path': TrustLevel.TRUST_FOLDER }, null, 2),
'utf-8', { encoding: 'utf-8', mode: 0o600 },
); );
}); });
}); });
+1 -1
View File
@@ -150,7 +150,7 @@ export function saveTrustedFolders(
fs.writeFileSync( fs.writeFileSync(
trustedFoldersFile.path, trustedFoldersFile.path,
JSON.stringify(trustedFoldersFile.config, null, 2), JSON.stringify(trustedFoldersFile.config, null, 2),
'utf-8', { encoding: 'utf-8', mode: 0o600 },
); );
} catch (error) { } catch (error) {
console.error('Error saving trusted folders file:', error); console.error('Error saving trusted folders file:', error);