mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 16:26:40 -04:00
strip angle brackets from syncName when downloading
This commit is contained in:
parent
a374246fba
commit
fb6d5a8556
1 changed files with 3 additions and 4 deletions
|
@ -2142,12 +2142,11 @@ it to your friends.
|
||||||
self.mainWin.buttonStack.show()
|
self.mainWin.buttonStack.show()
|
||||||
if self.loadAfterSync:
|
if self.loadAfterSync:
|
||||||
if self.loadAfterSync == 2:
|
if self.loadAfterSync == 2:
|
||||||
p = os.path.join(self.documentDir,
|
name = re.sub("[<>]", "", self.syncName)
|
||||||
self.syncName + ".anki")
|
p = os.path.join(self.documentDir, name + ".anki")
|
||||||
if os.path.exists(p):
|
if os.path.exists(p):
|
||||||
p = os.path.join(self.documentDir,
|
p = os.path.join(self.documentDir,
|
||||||
self.syncName + "%d.anki"
|
name + "%d.anki" % time.time())
|
||||||
% time.time())
|
|
||||||
shutil.copy2(self.deckPath, p)
|
shutil.copy2(self.deckPath, p)
|
||||||
self.deckPath = p
|
self.deckPath = p
|
||||||
self.loadDeck(self.deckPath, sync=False)
|
self.loadDeck(self.deckPath, sync=False)
|
||||||
|
|
Loading…
Reference in a new issue