summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/io/qfilesystemengine_win.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp
index 119ed7c..20b9b4d 100644
--- a/src/corelib/io/qfilesystemengine_win.cpp
+++ b/src/corelib/io/qfilesystemengine_win.cpp
@@ -503,8 +503,13 @@ QFileSystemEntry QFileSystemEngine::getLinkTarget(const QFileSystemEntry &link,
//static
QFileSystemEntry QFileSystemEngine::canonicalName(const QFileSystemEntry &entry, QFileSystemMetaData &data)
{
- // The caller has to verify whether the file exists or not.
- return QFileSystemEntry(slowCanonicalized(absoluteName(entry).filePath()));
+ if (data.missingFlags(QFileSystemMetaData::ExistsAttribute))
+ QFileSystemEngine::fillMetaData(entry, data, QFileSystemMetaData::ExistsAttribute);
+
+ if (data.exists())
+ return QFileSystemEntry(slowCanonicalized(absoluteName(entry).filePath()));
+ else
+ return QFileSystemEntry();
}
//static