mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 08:22:24 -04:00
don't die if exporting with no source media folder
This commit is contained in:
parent
3f01b1ef59
commit
3eb8b5fec2
1 changed files with 4 additions and 3 deletions
|
@ -199,9 +199,10 @@ class AnkiExporter(Exporter):
|
||||||
mid = row[2]
|
mid = row[2]
|
||||||
for file in self.src.media.filesInStr(mid, flds):
|
for file in self.src.media.filesInStr(mid, flds):
|
||||||
media[file] = True
|
media[file] = True
|
||||||
for fname in os.listdir(self.mediaDir):
|
if self.mediaDir:
|
||||||
if fname.startswith("_"):
|
for fname in os.listdir(self.mediaDir):
|
||||||
media[fname] = True
|
if fname.startswith("_"):
|
||||||
|
media[fname] = True
|
||||||
self.mediaFiles = media.keys()
|
self.mediaFiles = media.keys()
|
||||||
self.dst.crt = self.src.crt
|
self.dst.crt = self.src.crt
|
||||||
# todo: tags?
|
# todo: tags?
|
||||||
|
|
Loading…
Reference in a new issue