mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
don't move config.db more than once, bump version number
This commit is contained in:
parent
1e22d8b7c5
commit
a8764d49b1
1 changed files with 5 additions and 7 deletions
|
@ -7,7 +7,7 @@ from PyQt4.QtGui import *
|
||||||
from anki.hooks import runHook
|
from anki.hooks import runHook
|
||||||
|
|
||||||
appName="Anki"
|
appName="Anki"
|
||||||
appVersion="0.9.9.7.2"
|
appVersion="0.9.9.7.3"
|
||||||
appWebsite="http://ichi2.net/anki/download/"
|
appWebsite="http://ichi2.net/anki/download/"
|
||||||
appWiki="http://ichi2.net/anki/wiki/"
|
appWiki="http://ichi2.net/anki/wiki/"
|
||||||
appHelpSite="http://ichi2.net/anki/wiki/AnkiWiki"
|
appHelpSite="http://ichi2.net/anki/wiki/AnkiWiki"
|
||||||
|
@ -89,7 +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):
|
if os.path.exists(oldConf) and not os.path.exists(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"))
|
||||||
|
@ -97,11 +98,8 @@ def run():
|
||||||
os.path.expanduser("~/.anki/plugins"))
|
os.path.expanduser("~/.anki/plugins"))
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
try:
|
os.rename(oldConf, oldConf.replace("config.db",
|
||||||
os.rename(oldConf, oldConf.replace("config.db",
|
"config.db.old"))
|
||||||
"config.db.old"))
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
app = AnkiApp(sys.argv)
|
app = AnkiApp(sys.argv)
|
||||||
|
|
||||||
import forms
|
import forms
|
||||||
|
|
Loading…
Reference in a new issue