don't allow addons21 as profile name

because addons21 and profiles directory are stored in same directory
This commit is contained in:
BlueGreenMagick 2020-06-05 22:44:59 +09:00
parent 63201d450d
commit 7df3c9f0b1

View file

@ -265,8 +265,8 @@ class AnkiQt(QMainWindow):
# will be shown again
self.loadProfile(self.profileDiag.closeWithoutQuitting)
def profileNameOk(self, str):
return not checkInvalidFilename(str)
def profileNameOk(self, name: str) -> bool:
return not checkInvalidFilename(name) and name != "addons21"
def onAddProfile(self):
name = getOnlyText(_("Name:")).strip()