I hope someone can help me with the semantics of filepaths in my electron app.
I am porting from a webapp; my public assets are in a subdirectory (I’m on Linux) named public, but I find that this doesn’t work:
mainWindow.loadURL('file://' + __dirname + 'public/index.html');
In order to get electron to run, I had to move index.html (and other contents of the public directory) into the same directory where I start Electron, and leave the path like this:
mainWindow.loadURL('file://' + __dirname + '/index.html');
Also for other assets in my tree I find I have to specify a full Linux filepath to get at them, and that using ~ in the pathname doesn’t work.
Could someone point me to where I could read up on the rules for specifying paths?