# Errors

Command failures and integration errors.

---

## [ERR-20260703-001] LM Studio output directory mistaken for file

**Logged**: 2026-07-03T22:03:00+08:00
**Priority**: medium

When `lmstudio_polish.py` receives a single input file and an output path such as `.../1.1.1-坠毁后的第一夜`, `Path.suffix` treats `.1-坠毁后的第一夜` as a file suffix. The script then writes multiple chapter outputs into the same path instead of appending each source filename.

Fix: only treat `--out` as a direct output file when its suffix is `.md`; otherwise treat it as a directory.

**Update 2026-07-04**: Project structure has since dropped the "节" level and renamed the directory to `正文/1 弃船/1.1 坠毁后的第一夜/`. The suffix issue described above no longer applies to current paths, but the fix remains valid for any future dotted directory names.
