diff options
-rw-r--r-- | src/corelib/io/qfsfileengine_win.cpp | 14 | ||||
-rw-r--r-- | tests/auto/corelib/io/qfile/tst_qfile.cpp | 1 |
2 files changed, 0 insertions, 15 deletions
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp index 7a010df671..c99a25f30d 100644 --- a/src/corelib/io/qfsfileengine_win.cpp +++ b/src/corelib/io/qfsfileengine_win.cpp @@ -108,20 +108,6 @@ bool QFSFileEnginePrivate::nativeOpen(QIODevice::OpenMode openMode) { Q_Q(QFSFileEngine); - // Check if the file name is valid: - // https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#naming_conventions - const QString fileName = fileEntry.fileName(); - for (QString::const_iterator it = fileName.constBegin(), end = fileName.constEnd(); - it != end; ++it) { - const QChar c = *it; - if (c == QLatin1Char('<') || c == QLatin1Char('>') || c == QLatin1Char(':') || - c == QLatin1Char('\"') || c == QLatin1Char('/') || c == QLatin1Char('\\') || - c == QLatin1Char('|') || c == QLatin1Char('?') || c == QLatin1Char('*')) { - q->setError(QFile::OpenError, QStringLiteral("Invalid file name")); - return false; - } - } - // All files are opened in share mode (both read and write). DWORD shareMode = FILE_SHARE_READ | FILE_SHARE_WRITE; diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp index c7216dc169..32165ad2b8 100644 --- a/tests/auto/corelib/io/qfile/tst_qfile.cpp +++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp @@ -1155,7 +1155,6 @@ void tst_QFile::invalidFile_data() #else #if !defined(Q_OS_WINRT) QTest::newRow( "colon2" ) << invalidDriveLetter() + QString::fromLatin1(":ail:invalid"); - QTest::newRow( "date" ) << QString( "testLog-03:20.803Z.txt" ); #endif QTest::newRow( "colon3" ) << QString( ":failinvalid" ); QTest::newRow( "forwardslash" ) << QString( "fail/invalid" ); |