From 2bcf47cedcf70455319e414437ea804f7e0c368d Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Fri, 6 Jul 2012 18:10:49 +0200 Subject: [PATCH] fixed bug 1016927 (Filesystem encoding problem when importing songs) Fixes: https://launchpad.net/bugs/1016927 --- openlp/plugins/songs/forms/songimportform.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/openlp/plugins/songs/forms/songimportform.py b/openlp/plugins/songs/forms/songimportform.py index 1798f2baf..c871cfa87 100644 --- a/openlp/plugins/songs/forms/songimportform.py +++ b/openlp/plugins/songs/forms/songimportform.py @@ -541,12 +541,13 @@ class SongImportSourcePage(QtGui.QWizardPage): if wizard.formatWidgets[format][u'fileListWidget'].count() > 0: return True else: - filepath = wizard.formatWidgets[format][u'filepathEdit'].text() - if not filepath.isEmpty(): - if select_mode == SongFormatSelect.SingleFile \ - and os.path.isfile(filepath): + filepath = unicode( + wizard.formatWidgets[format][u'filepathEdit'].text()) + if filepath: + if select_mode == SongFormatSelect.SingleFile and \ + os.path.isfile(filepath): return True - elif select_mode == SongFormatSelect.SingleFolder \ - and os.path.isdir(filepath): + elif select_mode == SongFormatSelect.SingleFolder and \ + os.path.isdir(filepath): return True return False