mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -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"
|
os.environ['HOME'] = "c:\\anki"
|
||||||
try:
|
try:
|
||||||
os.makedirs(os.path.expanduser("~/.anki"))
|
os.makedirs(os.path.expanduser("~/.anki"))
|
||||||
except OSError:
|
except:
|
||||||
pass
|
pass
|
||||||
if os.path.exists(oldConf):
|
if os.path.exists(oldConf):
|
||||||
shutil.copy2(oldConf,
|
try:
|
||||||
os.path.expanduser("~/.anki/config.db"))
|
shutil.copy2(oldConf,
|
||||||
shutil.copytree(oldPlugins,
|
os.path.expanduser("~/.anki/config.db"))
|
||||||
os.path.expanduser("~/.anki/plugins"))
|
shutil.copytree(oldPlugins,
|
||||||
|
os.path.expanduser("~/.anki/plugins"))
|
||||||
|
except:
|
||||||
|
pass
|
||||||
os.rename(oldConf, oldConf.replace("config.db", "config.db.old"))
|
os.rename(oldConf, oldConf.replace("config.db", "config.db.old"))
|
||||||
|
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
|
|
||||||
import forms
|
import forms
|
||||||
|
|
Loading…
Reference in a new issue