sefodopo / FabricAutoBackup

GNU General Public License v3.0
6 stars 2 forks source link

BackupWhenExit stops backup before it finishes #5

Closed name-here closed 3 years ago

name-here commented 3 years ago

It seems like when it's backing up when the server is stopping, it kills the process before it finishes. The command I'm using to back up works outside Minecraft, but when run through AutoBackup on the server stopping, it stops early, leaving the backup incomplete.

name-here commented 3 years ago

I just looked through the source, and I think I found the problem. In backupWithoutSave() in Backup.java, you call .start() on the ProcessBuilder, but you don't wait for the process to finish, so all the stuff that's supposed to happen after the backup finishes just happens immediately.

sefodopo commented 3 years ago

I fixed this issue with #6 and caused #7 to happen, hopefully this is not a huge deal and everything works smoothly.