Hello,
I have an Electron app that needs to save quite a few files and user settings. To my understanding, app.getPath("userData") is a good place to do this.
In development, I've been using the userData directory perfectly. However, when I recently tried creating a distributable production build, this is not working quite as expected.
My problem is that the userData path is giving me a path to an .asar file, rather than a writeable directory. Thus, when I try to write files to this path, it fails. The exact path I'm getting it this: C:/Users/myuser/AppData/Local/Programs/electron-app/resources/app.asar
The electron docs suggest that the userData lookup should return a writeable directory, not some random file.
Any ideas?
Thanks!