From 7df3c9f0b133aed2d043f32978258574656aadc0 Mon Sep 17 00:00:00 2001 From: BlueGreenMagick <50060875+BlueGreenMagick@users.noreply.github.com> Date: Fri, 5 Jun 2020 22:44:59 +0900 Subject: [PATCH] don't allow addons21 as profile name because addons21 and profiles directory are stored in same directory --- qt/aqt/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qt/aqt/main.py b/qt/aqt/main.py index 0c4109ba4..212c5cd82 100644 --- a/qt/aqt/main.py +++ b/qt/aqt/main.py @@ -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()