diff --git a/utils/manager/savefile.py b/utils/manager/savefile.py index 96a36d4..ce4fd76 100644 --- a/utils/manager/savefile.py +++ b/utils/manager/savefile.py @@ -10,13 +10,13 @@ class SaveFile(dict): if not os.path.exists(_dir): os.makedirs(_dir) if os.path.exists(self.path): - with open(self.path) as f: + with open(self.path, 'w+') as f: self.update(json.loads(f.read())) else: self.save() def save(self): - with open(self.path, 'a+') as f: + with open(self.path, 'w+') as f: f.write(json.dumps(self, indent=1)) def __getitem__(self, key):