fix catch of access denied error

This commit is contained in:
Damien Elmes 2018-09-17 23:38:19 +10:00
parent 742fe274dd
commit ae3c0416db

View File

@ -214,7 +214,7 @@ a flash drive.""" % self.base)
os.rename(oldFolder, newFolder)
except WindowsError as e:
self.db.rollback()
if "Access is denied" in e:
if "Access is denied" 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 \