1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

FileSchemeHandler: Don't list "empty folder" if file url is invalid

- instead show just "Content not found" error
This commit is contained in:
nowrep 2012-08-24 14:53:12 +02:00
parent 0e046b73de
commit 7f2bc706de

View File

@ -45,7 +45,7 @@ QNetworkReply* FileSchemeHandler::createRequest(QNetworkAccessManager::Operation
// Only list directories
QFileInfo fileInfo(request.url().toLocalFile());
if (!fileInfo.isDir() && fileInfo.isReadable()) {
if (!fileInfo.isDir() || !fileInfo.isReadable() || !fileInfo.exists()) {
return 0;
}