mirror of
https://github.com/storytold/wordcraft.git
synced 2026-11-18 08:25:34 +00:00
`file.rename` appended the document's extension unconditionally, so
`{"name": "renamed.docx"}` produced `renamed.docx.docx`. The Rename field in
the ribbon edits the stem, which is why it was written that way, but a script
or an agent passes a whole file name.
A name that already ends in the document's extension is now taken as the whole
file name, whatever its case. Anything else still gets the extension: a name
that merely holds a dot (`Report.2026` -> `Report.2026.docm`), and the
extension on its own (`.docm` -> `.docm.docm`), which is a stem rather than a
file name.
Fix: #2983