forked from openlp/openlp
fixed bug 1016927 (Filesystem encoding problem when importing songs)
Fixes: https://launchpad.net/bugs/1016927
This commit is contained in:
parent
dc8496fa71
commit
2bcf47cedc
@ -541,12 +541,13 @@ class SongImportSourcePage(QtGui.QWizardPage):
|
|||||||
if wizard.formatWidgets[format][u'fileListWidget'].count() > 0:
|
if wizard.formatWidgets[format][u'fileListWidget'].count() > 0:
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
filepath = wizard.formatWidgets[format][u'filepathEdit'].text()
|
filepath = unicode(
|
||||||
if not filepath.isEmpty():
|
wizard.formatWidgets[format][u'filepathEdit'].text())
|
||||||
if select_mode == SongFormatSelect.SingleFile \
|
if filepath:
|
||||||
and os.path.isfile(filepath):
|
if select_mode == SongFormatSelect.SingleFile and \
|
||||||
|
os.path.isfile(filepath):
|
||||||
return True
|
return True
|
||||||
elif select_mode == SongFormatSelect.SingleFolder \
|
elif select_mode == SongFormatSelect.SingleFolder and \
|
||||||
and os.path.isdir(filepath):
|
os.path.isdir(filepath):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user