Merge pull request #51 from marado/corrupt

Check if the save file isn't corrupted
master
Nate Smith 2024-04-04 15:29:38 -04:00 committed by GitHub
commit 49ae1125d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,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