mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
read media files in binary format
This commit is contained in:
parent
90a4ac2584
commit
76b356fe0d
1 changed files with 1 additions and 1 deletions
|
@ -283,7 +283,7 @@ insert or ignore into revlog values (?,?,?,?,?,?,?,?,?)""", revlog)
|
|||
dir = self.src.media.dir()
|
||||
path = os.path.join(dir, fname)
|
||||
try:
|
||||
return open(path).read()
|
||||
return open(path, "rb").read()
|
||||
except IOError, OSError:
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in a new issue