Closed bkielczewski closed 4 months ago
LNM does not save any settings the registry.
All are stored in the configuration file C:\Users\YOURUSERNAME\AppData\Roaming\ABarthel\little_navmap.ini
.
Look for section [OptionsDialog]
and key Widget_lineEditOptionsWebDocroot
there.
If so, why does this entry exist in the registry and gets recreated when deleted and LNM is restarted after that?
Why do StaticFileController
log entries use the path from registry rather than from little_navmap.ini?
Widget_lineEditOptionsWebDocroot=C:\\Users\\bkiel\\IdeaProjects\\bartk-ingamepanels-lnm\\dist\\bkiel-ingamepanels-lnm\\web
points to what is displayed in the dialog, that's ok. The behavior of the web server is weird.
Ok. I see. This quite annoying and should not happen. Not my code but I'll fix this.
Correction. It is my code but the stupid QSettings object writes to the registry even if not synced. :man_facepalming:
Thank you for checking and quick reaction. With this one I'm mostly worried about webserver behavior, so when I ask my users to set the document root to something it will actually serve static files from there.
The registry is more (ab)used as a temporary store in this case. The change of the root folder does still work. That's what at least a quick test on Linux shows here.
Will fix and I can also send you a pre-3.0.4 stable before releasing for quick tests.
So on windows, it works partially.
Repro:
reg add "HKEY_CURRENT_USER\Software\ABarthel\Little Navmap" /v "path" /t REG_SZ /d "C:\wrong"
http://localhost:8965
in the browserin the log:
TemplateCache: trying file E:/MSFS/Packages/Community/bkiel-ingamepanels-lnm/web//index.html StaticFileController: Open file C:/wrong/runtime.03a33c114cec2ee3.js
So when changing document root: it updates in the tool window, in little_navmap.ini
, and it is even loading index.html
from correct location. But if this index.html references any static resources (images, js) they are fetched from C:\wrong
, where they don't exist, resulting in 404s.
I'm happy to help with testing.
Try this 3.0.3.rc2: https://k00.fr/52wh20b7
Web Server
is now handled correctly.Web Server
.Thanks.
I'll keep using this version throughout the weekend, so far looks perfect. Thank you for fixing!
Thanks for the confirmation. :+1:
The result of this is that webserver will still try to locate files by the old path from the registry, with document root in app pointing to somewhere else.
For clean installs, it probably never changes from default path.
This bug is likely present since 3.0.2.beta.