From 0f81ce4c24c2a7af1f678384a2bdec07d8309675 Mon Sep 17 00:00:00 2001 From: "beville@gmail.com" Date: Wed, 30 Jan 2013 18:40:03 +0000 Subject: [PATCH] make sure filenames are unicode git-svn-id: http://comictagger.googlecode.com/svn/trunk@374 6c5673fe-1810-88d6-992b-cd32ca31540c --- fileselectionlist.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fileselectionlist.py b/fileselectionlist.py index 4b435b2..08ded37 100644 --- a/fileselectionlist.py +++ b/fileselectionlist.py @@ -161,10 +161,11 @@ class FileSelectionList(QWidget): def addPathList( self, pathlist ): filelist = [] - filename_encoding = sys.getfilesystemencoding() for p in pathlist: # if path is a folder, walk it recursivly, and all files underneath - if type(p) != QString: + if type(p) == str: + #make sure string is unicode + filename_encoding = sys.getfilesystemencoding() p = p.decode(filename_encoding, 'replace') if os.path.isdir( unicode(p)):