mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
show traceback on deck load, use my documents on win32
This commit is contained in:
parent
375b33302e
commit
3d994b6359
1 changed files with 5 additions and 4 deletions
|
@ -496,9 +496,8 @@ Possible reasons:
|
||||||
- directory is read only
|
- directory is read only
|
||||||
- deck was created with Anki < 0.9
|
- deck was created with Anki < 0.9
|
||||||
|
|
||||||
To upgrade an old deck, download Anki 0.9.8.7.
|
To upgrade an old deck, download Anki 0.9.8.7."""))
|
||||||
|
traceback.print_exc()
|
||||||
Error was:\n%(f1)s\n...\n%(f2)s""") % {'f1': fmt1, 'f2': fmt2})
|
|
||||||
self.moveToState("noDeck")
|
self.moveToState("noDeck")
|
||||||
return
|
return
|
||||||
if uprecent:
|
if uprecent:
|
||||||
|
@ -1759,7 +1758,9 @@ Consider backing up your media directory first."""))
|
||||||
|
|
||||||
def setupDocumentDir(self):
|
def setupDocumentDir(self):
|
||||||
if sys.platform.startswith("win32"):
|
if sys.platform.startswith("win32"):
|
||||||
raise "nyi"
|
s = QSettings(QSettings.UserScope, "Microsoft", "Windows")
|
||||||
|
s.beginGroup("CurrentVersion/Explorer/Shell Folders")
|
||||||
|
self.documentDir = unicode(s.value("Personal").toString())
|
||||||
elif sys.platform.startswith("darwin"):
|
elif sys.platform.startswith("darwin"):
|
||||||
self.documentDir = os.path.expanduser("~/Documents")
|
self.documentDir = os.path.expanduser("~/Documents")
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue