diff options
-rw-r--r-- | src/widgets/dialogs/qfileinfogatherer.cpp | 2 | ||||
-rw-r--r-- | src/widgets/dialogs/qfilesystemmodel.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/dialogs/qfileinfogatherer.cpp b/src/widgets/dialogs/qfileinfogatherer.cpp index fc86576f55..98cde84450 100644 --- a/src/widgets/dialogs/qfileinfogatherer.cpp +++ b/src/widgets/dialogs/qfileinfogatherer.cpp @@ -238,7 +238,7 @@ QExtendedInformation QFileInfoGatherer::getInfo(const QFileInfo &fileInfo) const #endif #ifdef Q_OS_WIN - if (fileInfo.isSymLink() && m_resolveSymlinks) { + if (m_resolveSymlinks && fileInfo.isSymLink()) { QFileInfo resolvedInfo(fileInfo.symLinkTarget()); resolvedInfo = resolvedInfo.canonicalFilePath(); if (resolvedInfo.exists()) { diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp index 4d3c7a24ec..9a81e0f02f 100644 --- a/src/widgets/dialogs/qfilesystemmodel.cpp +++ b/src/widgets/dialogs/qfilesystemmodel.cpp @@ -800,7 +800,7 @@ QString QFileSystemModelPrivate::name(const QModelIndex &index) const if (!index.isValid()) return QString(); QFileSystemNode *dirNode = node(index); - if (dirNode->isSymLink() && fileInfoGatherer.resolveSymlinks()) { + if (fileInfoGatherer.resolveSymlinks() && !resolvedSymLinks.isEmpty() && dirNode->isSymLink()) { QString fullPath = QDir::fromNativeSeparators(filePath(index)); if (resolvedSymLinks.contains(fullPath)) return resolvedSymLinks[fullPath]; |