diff options
author | Karsten Heimrich <karsten.heimrich@qt.io> | 2021-05-03 14:40:53 +0200 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@qt.io> | 2021-05-11 13:22:44 +0200 |
commit | ec9e85656339dbc9e6918a1369c981cece7bc97d (patch) | |
tree | 8129c385cfb4cacd6f86b3cbdb2c1ef504fa5ab0 /src/corelib/io/qfilesystementry.cpp | |
parent | a120d11cb5506ef0a5535e790f23d49595fb8857 (diff) |
Fix QSaveFile and QTemporaryFile issues with windows network shares
The commit amends commit 3966b571 to take UNC prefix into account as
well. Fixes the weird file name output as reported in QTBUG-74291 and
QTBUG-83365. Replace manual separator normalizing in qt_cleanPath(),
this is another spot where UNC prefix handling needs to be applied.
Also make QTemporaryFile operate on '/' as file separators to fix
creating both file types with native path separators on network shares.
Fixes: QTBUG-74291
Fixes: QTBUG-76228
Fixes: QTBUG-83365
Pick-to: 5.15 6.0 6.1
Change-Id: Iff8d26b994bf4194c074cd5c996cda3934297fa5
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qfilesystementry.cpp')
-rw-r--r-- | src/corelib/io/qfilesystementry.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/corelib/io/qfilesystementry.cpp b/src/corelib/io/qfilesystementry.cpp index 9b474b25b1..83f8a86439 100644 --- a/src/corelib/io/qfilesystementry.cpp +++ b/src/corelib/io/qfilesystementry.cpp @@ -142,12 +142,6 @@ void QFileSystemEntry::resolveFilePath() const if (m_filePath.isEmpty() && !m_nativeFilePath.isEmpty()) { #if defined(QFILESYSTEMENTRY_NATIVE_PATH_IS_UTF16) m_filePath = QDir::fromNativeSeparators(m_nativeFilePath); -#ifdef Q_OS_WIN - if (m_filePath.startsWith(QLatin1String("//?/UNC/"))) - m_filePath = m_filePath.remove(2,6); - if (m_filePath.startsWith(QLatin1String("//?/"))) - m_filePath = m_filePath.remove(0,4); -#endif #else m_filePath = QDir::fromNativeSeparators(QFile::decodeName(m_nativeFilePath)); #endif |