diff --git a/main.js b/main.js index 1dc6a32..1dd7273 100644 --- a/main.js +++ b/main.js @@ -28,10 +28,13 @@ function loadConfig(configPath) { try { const configContents = fs.readFileSync(configPath, 'utf8'); const configOptions = JSON.parse(configContents); - // Merge default options with the ones from the config file + Object.assign(options, configOptions); } catch (error) { console.error('Error loading config file:', error); + }finally { +       +        fs.closeSync(fs.openSync(configPath, 'r')); } } @@ -206,4 +209,4 @@ app.on('window-all-closed', () => { }else{ session.defaultSession.clearStorageData() } -}); \ No newline at end of file +});