mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 08:22:24 -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()
|
||||
if self.loadAfterSync:
|
||||
if self.loadAfterSync == 2:
|
||||
p = os.path.join(self.documentDir,
|
||||
self.syncName + ".anki")
|
||||
name = re.sub("[<>]", "", self.syncName)
|
||||
p = os.path.join(self.documentDir, name + ".anki")
|
||||
if os.path.exists(p):
|
||||
p = os.path.join(self.documentDir,
|
||||
self.syncName + "%d.anki"
|
||||
% time.time())
|
||||
name + "%d.anki" % time.time())
|
||||
shutil.copy2(self.deckPath, p)
|
||||
self.deckPath = p
|
||||
self.loadDeck(self.deckPath, sync=False)
|
||||
|
|
Loading…
Reference in a new issue