fix check for user exporting into data folder on Windows

https://forums.ankiweb.net/t/unable-to-export-colpkg-file/10527
This commit is contained in:
Damien Elmes 2021-11-25 09:30:17 +10:00
parent ebad6ad379
commit 88392634a8

View file

@ -139,6 +139,7 @@ class ExportDialog(QDialog):
return return
if checkInvalidFilename(os.path.basename(file), dirsep=False): if checkInvalidFilename(os.path.basename(file), dirsep=False):
continue continue
file = os.path.normpath(file)
if os.path.commonprefix([self.mw.pm.base, file]) == self.mw.pm.base: if os.path.commonprefix([self.mw.pm.base, file]) == self.mw.pm.base:
showWarning("Please choose a different export location.") showWarning("Please choose a different export location.")
continue continue