From 163a0475ebf403fd39f7a7cc764119b40664da1d Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 1 Apr 2019 17:40:29 +0200 Subject: Windows: Fix QFileSystemEngine::id() for FAT32 drives GetFileInformationByHandleEx() which is used to to obtain the ID, has been found to fail on FAT32 (USB removable drives). Fall back to GetFileInformationByHandle() for these. Fixes: QTBUG-74759 Change-Id: Ib3ef60a6bf9e9edaf41af86bf71666001cb0aa58 Reviewed-by: Thiago Macieira --- src/corelib/io/qfilesystemengine_win.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/corelib/io') diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp index 3f4b46573b..2020e34f93 100644 --- a/src/corelib/io/qfilesystemengine_win.cpp +++ b/src/corelib/io/qfilesystemengine_win.cpp @@ -555,7 +555,7 @@ typedef struct _FILE_ID_INFO { #endif // if defined (Q_CC_MINGW) && WINVER < 0x0602 -// File ID for Windows up to version 7. +// File ID for Windows up to version 7 and FAT32 drives static inline QByteArray fileId(HANDLE handle) { #ifndef Q_OS_WINRT @@ -588,6 +588,8 @@ QByteArray fileIdWin8(HANDLE handle) result += ':'; // Note: MinGW-64's definition of FILE_ID_128 differs from the MSVC one. result += QByteArray(reinterpret_cast(&infoEx.FileId), int(sizeof(infoEx.FileId))).toHex(); + } else { + result = fileId(handle); // GetFileInformationByHandleEx() is observed to fail for FAT32, QTBUG-74759 } return result; #else // !QT_BOOTSTRAPPED && !QT_BUILD_QMAKE -- cgit v1.2.3 From c4d46723eb8cd17b17b87df230d502a071f4ac19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Fri, 22 Mar 2019 09:51:11 +0100 Subject: wasm: disable XDG_RUNTIME_DIR warning XDG is not very relevant on the Web platform. Change-Id: Ibd885e28da15114d0601c73e34dec556e65cbe75 Reviewed-by: David Faure --- src/corelib/io/qstandardpaths_unix.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/corelib/io') diff --git a/src/corelib/io/qstandardpaths_unix.cpp b/src/corelib/io/qstandardpaths_unix.cpp index 748ce67dac..eaa545b4fd 100644 --- a/src/corelib/io/qstandardpaths_unix.cpp +++ b/src/corelib/io/qstandardpaths_unix.cpp @@ -134,7 +134,9 @@ QString QStandardPaths::writableLocation(StandardLocation type) return QString(); } } +#ifndef Q_OS_WASM qWarning("QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '%s'", qPrintable(xdgRuntimeDir)); +#endif } else { fileInfo.setFile(xdgRuntimeDir); if (!fileInfo.exists()) { -- cgit v1.2.3