readonlyFix.patch
1 diff --git a/src/main/settings.ts b/src/main/settings.ts 2 index 6fad97f..dfc64e3 100644 3 --- a/src/main/settings.ts 4 +++ b/src/main/settings.ts 5 @@ -26,8 +26,10 @@ function loadSettings<T extends object = any>(file: string, name: string) { 6 7 const store = new SettingsStore(settings); 8 store.addGlobalChangeListener(o => { 9 - mkdirSync(dirname(file), { recursive: true }); 10 - writeFileSync(file, JSON.stringify(o, null, 4)); 11 + try { 12 + mkdirSync(dirname(file), { recursive: true }); 13 + writeFileSync(file, JSON.stringify(o, null, 4)); 14 + } catch {} 15 }); 16 17 return store;