fix unicode issue

This commit is contained in:
ville rantanen
2014-06-29 16:29:00 +03:00
parent fa04f4a446
commit 9eb6ec183a

View File

@@ -160,7 +160,7 @@ def add_single(conn,filename,change=False,hash=None,minsize=0):
hash=get_md5(filename)
ftime=os.path.getmtime(filename)
fsize=os.path.getsize(filename)
mime=MIME.file(filename)
mime=MIME.file(filename.decode('utf-8'))
if change:
db.execute("UPDATE list SET date=?, hash=?, size=?, mime=? \
WHERE file=?",(ftime,hash,fsize,mime,filename))