Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.12.1
-
Windows 10, VC14
-
-
ec9e85656339dbc9e6918a1369c981cece7bc97d (qt/qtbase/dev) 9d0be7b1a920cd9d7ae949bc3dc14774a439b3d0 (qt/qtbase/6.0) ad12c3c40b07079d875f48027eef0786acef7de0 (qt/qtbase/6.1)
Description
When using a template with an absolute Windows network path the opening of the QTemporaryFile fails because the path is not detected as an absolute path:
QString absName = "\\\\localhost\\C$\\tmp.XXXXXX"; QTemporaryFile tmp(absName); if (tmp.open()) { tmp.close(); } else { qDebug() << tmp.errorString(); }
QFileSystemEntry::isRelative() does not consider UNC paths such that QFileSystemEngine::absoluteName() adds the current working directory to the already absolute path.
Using '/' as file separator seems to work by mistake.
Attachments
Issue Links
- is required for
-
QTBUG-75129 Rationalize handling of UNC paths on Windows
- Closed
- relates to
-
QTBUG-76228 QSaveFile unable to open UNC path to write on Windows
- Closed
-
QTBUG-83365 QTemporary file on network share change from 5.13.2
- Closed