nathanbuchar / electron-settings

📝 A simple persistent user settings framework for Electron.
https://electron-settings.js.org
MIT License
817 stars 60 forks source link

Calling Settings.has throws exception on windows when launching program for the first time after installation #99

Closed MajPay closed 7 years ago

MajPay commented 7 years ago

It seems the folder, where the settings should be stored does not exist when launching the program for the first time after installation on a windows machine.

I don't know, if the problem is related to electron-settings or the installation process of electron-packager.

I inspected the code of electron-settings and it seems, that the call to make sure the settings file exists, is present in has/get/set callstacks.

Did someone experience that issue too?

MajPay commented 7 years ago

Sorry, i found the issue. Instead of loading the Settings in the global scope of the main javascript file, you have to do it in the ready event of the electron app.

nathanbuchar commented 7 years ago

Yessir!

Glad you figured it out :-)