unicode fixing

This commit is contained in:
ville rantanen
2014-06-29 16:48:21 +03:00
parent 9eb6ec183a
commit 2db914a4ca

View File

@@ -48,6 +48,7 @@ def setup_options():
BADDIRS.extend(options.exclude)
if options.duplicate:
options.add=not options.add
options.startpath=unicode(optins.startpath, "UTF-8")
return options
def createdb(fname):
@@ -160,7 +161,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.decode('utf-8'))
mime=MIME.file(filename)
if change:
db.execute("UPDATE list SET date=?, hash=?, size=?, mime=? \
WHERE file=?",(ftime,hash,fsize,mime,filename))