Check if the save file isn't corrupted

If the save file is empty, then it will not be loadable, and it is best
act as if none existed.
pull/51/head
Marcos Marado 2023-09-13 15:38:08 +00:00
parent 070a880f12
commit 1fffd41783
1 changed files with 1 additions and 1 deletions

View File

@ -393,7 +393,7 @@ class DataManager(object):
def check_plant(self):
# check for existing save file
if os.path.isfile(self.savefile_path):
if os.path.isfile(self.savefile_path) and os.path.getsize(self.savefile_path) > 0:
return True
else:
return False