Skip to content

Prevent renaming town/nation files when name is invalid#8137

Merged
LlmDl merged 1 commit intomasterfrom
fix/rejected-town-file-rename
Mar 10, 2026
Merged

Prevent renaming town/nation files when name is invalid#8137
LlmDl merged 1 commit intomasterfrom
fix/rejected-town-file-rename

Conversation

@Warriorrrr
Copy link
Copy Markdown
Member

Description:

(only affects flatfile databases)

Spotted by Llmdl, towns & nations files are no longer name-based when using flatfile, so we shouldn't be renaming them back to a name. Nations with bad names were also being re-registered with a different UUID, which is bad.

Added internal to the name replacement map since it is, for now it's still necessary for the rare case someone has a pre-uuid db with a town with an invalid name and is updating to a newer version.


  • I have tested this pull request for defects on a server.

By making this pull request, I represent that I have the right to waive copyright and related rights to my contribution, and agree that all copyright and related rights in my contributions are waived, and I acknowledge that the TownyAdvanced organization has the copyright to use and modify my contribution under the Towny License for perpetuity.

@Warriorrrr Warriorrrr added this to the 0.103.0.0 milestone Mar 10, 2026
@Warriorrrr Warriorrrr added the bug label Mar 10, 2026
@LlmDl LlmDl merged commit f6c780f into master Mar 10, 2026
3 checks passed
@LlmDl LlmDl deleted the fix/rejected-town-file-rename branch March 10, 2026 14:48
LlmDl added a commit that referenced this pull request Mar 10, 2026
  - Prevent renaming town/nation files when name is invalid, courtesy of
Warrior with PR #8137.
    - Flatfile databases which loaded towns/nations with invalid names
could result in a town/nation file being created with a name instead of
a UUID.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants