Commit
4fb5035aebd30d34d2cb5ba9835ef520a90662be
by nossr50Report FlatFile writes that fail instead of claiming success
writeStringToFileSafely logged and swallowed any IOException from the
write, so every operation that rewrote mcmmo.users returned success
whether or not anything reached disk. saveUser told PlayerProfile the
profile was saved, so it was never retried. saveUserUUIDs told the UUID
upgrade its batch was stored, and removeUser, saveUserUUID and
purgePowerlessUsers reported changes that never happened.
The helper now returns whether the write went through, rewriteUsersFile
returns it, and each caller passes it on and skips its success logging
when it failed. The users file writer is opened through a package-private
factory, alongside the existing reader factory, so tests can make it fail.
The mid-read failure tests are split into one parameterized case per
operation so each broken path fails on its own, and write failures get
the same coverage.
(commit: 4fb5035)