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
parent
070a880f12
commit
1fffd41783
|
@ -393,7 +393,7 @@ class DataManager(object):
|
||||||
|
|
||||||
def check_plant(self):
|
def check_plant(self):
|
||||||
# check for existing save file
|
# 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
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in New Issue