mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:20:53 +01:00
[PR #1835] leonida_mods: install accepts the file names pack writes (MODS-PACKAGE-FILE-NAMES) #1846
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1846
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1835
Author: @RK28A
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:mods-package-file-names📝 Commits (1)
58f14c3leonida_mods: install accepts the file names pack writes📊 Changes
3 files changed (+132 additions, -4 deletions)
View changed files
📝
docs/modding.md(+3 -1)➕
tests/test_mod_package_names.py(+107 -0)📝
tools/leonida_mods.py(+22 -3)📄 Description
Claimed in the coordination issue as: MODS-PACKAGE-FILE-NAMES
What and why
installchecked each file name of a package againstsafe_folder_name(). That function makes a tidy folder label so it also collapses double spaces and cuts at 80 characters. A mod with a file likeread me.txtor a name longer than 80 characters was packed bypackand then refused byinstallas an unsafe ZIP member name.Package names are now refused only when they hold a path separator or a reserved character or end with a dot or a space or are a Windows device name.
packruns the same check before it writes so it never writes a package thatinstallrefuses.Tested
python -I tests/test_mod_package_names.pypasses with 5 tests and all 5 fail without the change.tests/test_leonida_mods.pyandtests/test_mod_pack_output_alias.pystill pass. I compared the old and the new check on 400,000 generated names and no unsafe name is accepted. Linux and Python 3.13.GPUs tested: n/a
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.