From 36f5fd0e4cca3ab9491118dc9bcef2b54a044372 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 5 Nov 2012 04:32:04 +0900 Subject: [PATCH] remove obsolete func --- anki/importing/anki2.py | 2 ++ anki/media.py | 16 ---------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/anki/importing/anki2.py b/anki/importing/anki2.py index 9118238db..62c23d7bd 100644 --- a/anki/importing/anki2.py +++ b/anki/importing/anki2.py @@ -283,6 +283,8 @@ insert or ignore into revlog values (?,?,?,?,?,?,?,?,?)""", revlog) # Media ###################################################################### + # note: this func only applies to imports of .anki2. for .apkg files, the + # apkg importer does the copying def _importStaticMedia(self): # Import any '_foo' prefixed media files regardless of whether # they're used on notes or not diff --git a/anki/media.py b/anki/media.py index c8d00b119..05f63d790 100644 --- a/anki/media.py +++ b/anki/media.py @@ -194,22 +194,6 @@ If the same name exists, compare checksums.""" # Copying on import ########################################################################## - # FIXME: check if the files are actually identical, and rewrite references - # if necessary - - def copyTo(self, rdir): - "Copy media to RDIR. Return number of files copied." - ldir = self.dir() - if not os.path.exists(ldir): - return 0 - cnt = 0 - for f in os.listdir(ldir): - src = os.path.join(ldir, f) - dst = os.path.join(rdir, f) - if not os.path.exists(dst): - shutil.copyfile(src, dst) - cnt += 1 - return cnt def have(self, fname): return os.path.exists(os.path.join(self.dir(), fname))