Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
btonasse authored May 25, 2020
1 parent 8ef6a6d commit 5ef3201
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ def save(self, path, file):
if any(char not in validtext for char in file):
Factory.GenericPop(title='Error',lbl_text='No special characters on the filename, please.').open()
return
if file in 'currentKey.txt' or file in 'defaultKey.txt':
Factory.GenericPop(title='Error',lbl_text='This file cannot be overwritten.').open()
return
oldkey_text = self.get_currentKeyFile()
filename = os.path.join(path, file)

Expand Down

0 comments on commit 5ef3201

Please sign in to comment.