From c2f7b48a2996e722d97b5da8e333e25758635ae3 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 25 Feb 2017 18:07:01 +1000 Subject: [PATCH] use QStandardPaths instead of the env var --- aqt/profiles.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aqt/profiles.py b/aqt/profiles.py index 5586a7c8f..9728b4408 100644 --- a/aqt/profiles.py +++ b/aqt/profiles.py @@ -248,7 +248,8 @@ and no other programs are accessing your profile folders, then try again.""")) def _defaultBase(self): if isWin: - return os.path.join(os.environ["APPDATA"], "Anki2") + loc = QStandardPaths.writableLocation(QStandardPaths.AppDataLocation) + return os.path.join(loc, "Anki2") elif isMac: return os.path.expanduser("~/Library/Application Support/Anki2") else: