fix bug when APPDATA not defined

This commit is contained in:
Damien Elmes 2009-05-21 20:10:52 +09:00
parent 515408d6a5
commit 659821c7bb

View file

@ -89,8 +89,8 @@ def run():
os.makedirs(os.path.expanduser("~/.anki")) os.makedirs(os.path.expanduser("~/.anki"))
except: except:
pass pass
if os.path.exists(oldConf) and not os.path.exists(oldConf.replace( if (oldConf and os.path.exists(oldConf) and not os.path.exists(
"config.db", "config.db.old")): oldConf.replace("config.db", "config.db.old"))):
try: try:
shutil.copy2(oldConf, shutil.copy2(oldConf,
os.path.expanduser("~/.anki/config.db")) os.path.expanduser("~/.anki/config.db"))