mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -04:00
try to fix upgrade errors
This commit is contained in:
parent
f8d005fc3d
commit
e6ec61b301
1 changed files with 8 additions and 6 deletions
|
@ -78,15 +78,17 @@ def run():
|
|||
os.environ['HOME'] = "c:\\anki"
|
||||
try:
|
||||
os.makedirs(os.path.expanduser("~/.anki"))
|
||||
except OSError:
|
||||
except:
|
||||
pass
|
||||
if os.path.exists(oldConf):
|
||||
shutil.copy2(oldConf,
|
||||
os.path.expanduser("~/.anki/config.db"))
|
||||
shutil.copytree(oldPlugins,
|
||||
os.path.expanduser("~/.anki/plugins"))
|
||||
try:
|
||||
shutil.copy2(oldConf,
|
||||
os.path.expanduser("~/.anki/config.db"))
|
||||
shutil.copytree(oldPlugins,
|
||||
os.path.expanduser("~/.anki/plugins"))
|
||||
except:
|
||||
pass
|
||||
os.rename(oldConf, oldConf.replace("config.db", "config.db.old"))
|
||||
|
||||
app = QApplication(sys.argv)
|
||||
|
||||
import forms
|
||||
|
|
Loading…
Reference in a new issue