mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 16:02:23 -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]
|
||||
for file in self.src.media.filesInStr(mid, flds):
|
||||
media[file] = True
|
||||
for fname in os.listdir(self.mediaDir):
|
||||
if fname.startswith("_"):
|
||||
media[fname] = True
|
||||
if self.mediaDir:
|
||||
for fname in os.listdir(self.mediaDir):
|
||||
if fname.startswith("_"):
|
||||
media[fname] = True
|
||||
self.mediaFiles = media.keys()
|
||||
self.dst.crt = self.src.crt
|
||||
# todo: tags?
|
||||
|
|
Loading…
Reference in a new issue