mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -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
|
# case insensitive filesystems suck
|
||||||
pass
|
pass
|
||||||
else:
|
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]
|
newSize = os.stat(new)[stat.ST_SIZE]
|
||||||
if not deck.s.scalar(
|
if not deck.s.scalar(
|
||||||
"select 1 from media where filename = :f",
|
"select 1 from media where filename = :f",
|
||||||
|
|
Loading…
Reference in a new issue