Merge remote-tracking branch 'origin/pr/3175'
This commit is contained in:
commit
fdc9dfdf87
@ -127,7 +127,10 @@ class FileSchemeHandler(schemehandler.SchemeHandler):
|
||||
A QNetworkReply for directories, None for files.
|
||||
"""
|
||||
path = request.url().toLocalFile()
|
||||
if os.path.isdir(path):
|
||||
data = dirbrowser_html(path)
|
||||
return networkreply.FixedDataNetworkReply(
|
||||
request, data, 'text/html', self.parent())
|
||||
try:
|
||||
if os.path.isdir(path):
|
||||
data = dirbrowser_html(path)
|
||||
return networkreply.FixedDataNetworkReply(
|
||||
request, data, 'text/html', self.parent())
|
||||
except UnicodeEncodeError:
|
||||
return None
|
||||
|
Loading…
Reference in New Issue
Block a user