mirror of
https://github.com/ankitects/anki.git
synced 2025-11-12 07:37:11 -05:00
make sure src and dst locations are not the same
This commit is contained in:
parent
1d37924b54
commit
33372980cc
1 changed files with 3 additions and 2 deletions
|
|
@ -2870,7 +2870,7 @@ This deck already exists on your computer. Overwrite the local copy?"""),
|
|||
|
||||
def setupMedia(self, deck):
|
||||
prefix = self.config['mediaLocation']
|
||||
prev = deck.getVar("mediaLocation")
|
||||
prev = deck.getVar("mediaLocation") or ""
|
||||
# set the media prefix
|
||||
if not prefix:
|
||||
next = ""
|
||||
|
|
@ -2910,6 +2910,7 @@ This deck already exists on your computer. Overwrite the local copy?"""),
|
|||
self.setupDropbox(deck)
|
||||
|
||||
def migrateMedia(self, from_, to):
|
||||
assert from_ != to
|
||||
files = os.listdir(from_)
|
||||
skipped = False
|
||||
for f in files:
|
||||
|
|
@ -2952,7 +2953,7 @@ is next loaded."""))
|
|||
if self.config['dropboxPublicFolder']:
|
||||
# update media urls
|
||||
deck.s.statement("update models set features = :url",
|
||||
url=self.config['dropboxPublicFolder'])
|
||||
url=self.config['dropboxPublicFolder'] + "/")
|
||||
|
||||
# Advanced features
|
||||
##########################################################################
|
||||
|
|
|
|||
Loading…
Reference in a new issue