Commit 24f07b7a authored by Oswald Buddenhagen's avatar Oswald Buddenhagen

fix wildcard expansion, etc. under windows

raw strings would break things due to the missing null terminator. this
did not affect unix, as there we convert to 8 bit anyway.

Task-number: QTCREATORBUG-1364
parent e80a4b96
......@@ -46,7 +46,7 @@ IoUtils::FileType IoUtils::fileType(const QString &fileName)
{
Q_ASSERT(fileName.isEmpty() || isAbsolutePath(fileName));
#ifdef Q_OS_WIN
DWORD attr = GetFileAttributesW((WCHAR*)fileName.constData());
DWORD attr = GetFileAttributesW((WCHAR*)fileName.utf16());
if (attr == INVALID_FILE_ATTRIBUTES)
return FileNotFound;
return (attr & FILE_ATTRIBUTE_DIRECTORY) ? FileIsDir : FileIsRegular;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment