From 524a37f99d3d3115a1b371fd289044d90349a824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Thu, 20 Dec 2018 17:38:03 +0100 Subject: [PATCH] qfilesystemengine_win: Update LinkType whenever asked Checking the known flags prevented us from correctly setting the LinkType flag if we had previously set LinkType as a known flag since the flag is not reset between updates. Manifested itself in situations where the file info is loaded and then the LegacyLinkType flag is checked through QFileInfoPrivate::checkAttribute. Since the LegacyLinkType is not set for Windows it will update the metadata and exclude the LinkType flag. Change-Id: Iea27f42fe11f36ba2247e52fa9c82b4639666a64 Fixes: QTBUG-72644 Reviewed-by: Thiago Macieira --- src/corelib/io/qfilesystemengine_win.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp index a796fd005a..3f4b46573b 100644 --- a/src/corelib/io/qfilesystemengine_win.cpp +++ b/src/corelib/io/qfilesystemengine_win.cpp @@ -1038,8 +1038,7 @@ bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemM if (what & QFileSystemMetaData::Permissions) fillPermissions(fname, data, what); - if ((what & QFileSystemMetaData::LinkType) - && data.missingFlags(QFileSystemMetaData::LinkType)) { + if (what & QFileSystemMetaData::LinkType) { data.knownFlagsMask |= QFileSystemMetaData::LinkType; if (data.fileAttribute_ & FILE_ATTRIBUTE_REPARSE_POINT) { WIN32_FIND_DATA findData;