From 2db914a4ca4acb869c6d501ebe6916499093eb00 Mon Sep 17 00:00:00 2001 From: ville rantanen Date: Sun, 29 Jun 2014 16:48:21 +0300 Subject: [PATCH] unicode fixing --- file_list.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/file_list.py b/file_list.py index e2813df..c5a9ad9 100755 --- a/file_list.py +++ b/file_list.py @@ -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))