mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
make sure both args are unicode
This commit is contained in:
parent
b3be3772fb
commit
35ef8e6fa9
1 changed files with 2 additions and 1 deletions
|
@ -68,7 +68,8 @@ Update media table. If file already exists, don't copy."""
|
|||
# case insensitive filesystems suck
|
||||
pass
|
||||
else:
|
||||
shutil.copy2(path, new.encode(sys.getfilesystemencoding()))
|
||||
shutil.copy2(path.encode(sys.getfilesystemencoding()),
|
||||
new.encode(sys.getfilesystemencoding()))
|
||||
newSize = os.stat(new)[stat.ST_SIZE]
|
||||
if not deck.s.scalar(
|
||||
"select 1 from media where filename = :f",
|
||||
|
|
Loading…
Reference in a new issue