Skip to content

UndertaleModCli: Saving fix when replacing larger older file#2063

Merged
colinator27 merged 1 commit intoUnderminersTeam:masterfrom
skirlez:undertalemodcli-saving-fix
Mar 19, 2025
Merged

UndertaleModCli: Saving fix when replacing larger older file#2063
colinator27 merged 1 commit intoUnderminersTeam:masterfrom
skirlez:undertalemodcli-saving-fix

Conversation

@skirlez
Copy link
Copy Markdown
Contributor

@skirlez skirlez commented Mar 19, 2025

Description

Previously, when saving and replacing an older data file with UndertaleModCli, if the older data file was bigger, UndertaleModCli would not truncate it down to the new size, causing it to have extra data at the end. Both GameMaker and UndertaleModTool seem reject loading data files with leftover data.

This PR modifies how UndertaleModCli saves to be more in line with UndertaleModTool, using a temp file which replaces the original older file if saving was successful.

Caveats

Notes

@github-actions
Copy link
Copy Markdown

Copy link
Copy Markdown
Member

@colinator27 colinator27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me - I'll make some small changes to formatting (and to how the file is moved, even in the existing GUI implementation) after merging, though.

@colinator27 colinator27 merged commit 993f190 into UnderminersTeam:master Mar 19, 2025
5 checks passed
@skirlez skirlez deleted the undertalemodcli-saving-fix branch March 19, 2025 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants