catch profile rename error in non-English locales

This commit is contained in:
Damien Elmes 2019-02-06 09:02:56 +10:00
parent 1e9fb6ab29
commit bf6e10ec88

View File

@ -228,7 +228,7 @@ details have been forgotten."""))
os.rename(oldFolder, newFolder)
except WindowsError as e:
self.db.rollback()
if "Access is denied" in str(e):
if "WinError 5" in str(e):
showWarning(_("""\
Anki could not rename your profile because it could not rename the profile \
folder on disk. Please ensure you have permission to write to Documents/Anki \