Files
willmiao-ComfyUI-Lora-Manager/static/css/components/modal
Will Miao fa6712cff9 feat(settings): create folders from the directory picker
The settings folder picker could only select existing directories, so
creating a model root meant leaving the UI to create the folder first.

- Add POST /api/lm/create-directory, backed by create_directory() in
  py/utils/directory_browser.py: it creates one subfolder of the browsed
  directory and rejects names that are not a single safe path segment
  (separators, dot names, Windows-invalid characters and reserved names,
  over-long names) plus duplicates, missing/non-directory parents and
  permission errors, each with a stable error_code.
- Add a New Folder button and an inline name row to the picker; the
  created folder is entered immediately so it can be selected with one
  click. Esc dismisses the row before closing the modal, and the button
  is disabled on the Windows drive-list level where there is no
  directory to create in.
- Map the server error codes to localized picker messages.
- Cover the endpoint and the picker flow with backend and frontend tests.
2026-11-06 12:46:53 +08:00
..