Commit Graph

1 Commits

Author SHA1 Message Date
58f14c3d68 leonida_mods: install accepts the file names pack writes
zip_parts() decided whether a package member's name was safe by comparing
it with safe_folder_name(), which makes a tidy folder label out of free
text: it also collapses runs of spaces, strips them at both ends and cuts
at 80 characters. So a mod holding `read  me.txt`, a file name with an
ideographic space or one longer than 80 characters packed without a word
and could not be installed again: "unsafe ZIP member name". The same ZIP
made by hand was refused the same way.

Members are now checked with portable_name(): no separator, control or
reserved character, no trailing dot or space, not a device name. It also
refuses `COM1 .log`, which the label comparison let through.

`pack` runs the same check before it writes anything, so it stops at a
file `install` would refuse (`con.txt` or `a:b` made on Linux) instead of
writing a package nobody can install.
2026-11-25 12:24:35 +00:00