Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix recreating deleted savefiles #2114

Merged
merged 2 commits into from
Nov 30, 2024

Conversation

ike709
Copy link
Collaborator

@ike709 ike709 commented Nov 29, 2024

On my machine the BasicReadAndWrite.dm test would fail on subsequent runs. This was because after fdel("savefile.sav") executed the file would be recreated.

Flush() was calling Resource!.Clear() which calls File.WriteAllText(_filePath, string.Empty); which creates a new file.

Now we simply avoid flushing if the savefile file no longer exists.

@boring-cyborg boring-cyborg bot added the Runtime Involves the OpenDream server/runtime label Nov 29, 2024
@wixoaGit wixoaGit enabled auto-merge (squash) November 30, 2024 21:19
@wixoaGit wixoaGit merged commit b9bfd6a into OpenDreamProject:master Nov 30, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Runtime Involves the OpenDream server/runtime size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants