Merge pull request #51 from marado/corrupt
Check if the save file isn't corrupted
This commit is contained in:
commit
49ae1125d3
@ -81,7 +81,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…
x
Reference in New Issue
Block a user