Files
wordcraft/crates/engine
Hamza d78238345c Rename: split the name at its last dot, not at a byte offset
The extension check counted bytes back from the end of the name and
sliced there, which panics when that offset falls inside a character:

    (file.rename {"name": "abecde"} with a combining accent, .docm)
    byte index 3 is not a char boundary; it is inside 'e' (bytes 2..4)

Splitting at the name's own last dot asks the same question without an
arithmetic offset, and reads the same for every name. Covered for a name
with no extension and one with the document's, both multi-byte.
2026-10-20 00:39:52 +05:00
..