remove obsolete func

This commit is contained in:
Damien Elmes 2012-11-05 04:32:04 +09:00
parent 49df458409
commit 36f5fd0e4c
2 changed files with 2 additions and 16 deletions

View file

@ -283,6 +283,8 @@ insert or ignore into revlog values (?,?,?,?,?,?,?,?,?)""", revlog)
# Media # Media
###################################################################### ######################################################################
# note: this func only applies to imports of .anki2. for .apkg files, the
# apkg importer does the copying
def _importStaticMedia(self): def _importStaticMedia(self):
# Import any '_foo' prefixed media files regardless of whether # Import any '_foo' prefixed media files regardless of whether
# they're used on notes or not # they're used on notes or not

View file

@ -194,22 +194,6 @@ If the same name exists, compare checksums."""
# Copying on import # 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): def have(self, fname):
return os.path.exists(os.path.join(self.dir(), fname)) return os.path.exists(os.path.join(self.dir(), fname))