Commit Graph
3 Commits
Author SHA1 Message Date
Vito Sansevero fc55f5cb1c test(lora): set the settings folder relative to the process folder (#355)
os.path.relpath fails across Windows drives (the temp folder on C:, the
checkout on D:); the test now changes into its temp folder instead.
2026-10-26 18:07:11 -07:00
Vito Sansevero 9d8c4fafe4 fix(lora): never serve a LoraManager folder that holds the home folder (#355)
The folder guard also rejects ancestors of the home folder (/home,
C:\Users), compared in the realpath + normcase form, so a LoraManager
setting cannot widen the image server's allow-list to every user's files.
2026-10-26 17:48:29 -07:00
Vito Sansevero 96dea818d7 fix(lora): read LoraManager's settings and storage layout the way it does (#355)
Add py/lora_manager_layout.py: the settings file in LoraManager's lookup
order (environment folder, portable plugin file, user config folder), only
the seven keys the import needs, the LoRA roots, the centralized sidecar
root, the example-images root and the active library, each folder through
one guard. Sidecar discovery for both storage modes and the local preview
and example-image lookup live there too.

The test runner and the browser test server point LoraManager's settings
lookup at a disposable folder, so no test reads the real settings.
2026-10-26 17:24:48 -07:00