Details
Description
If you create a symbolic link on Windows 7 to a UNC path
mklink /d link \\server\share\dir
then use QDir()::canonicalPath to get the expanded path this is wrong. The issue is the code of readSymLink this uses DeviceIoControl to get the value of
the link. When a UNC path is used the result is ??\UNC\server\share\dir and the code current does not remove the UNC and replace by \. This result in the returned path being incorrect.
A possible fix is to do something like
if(result.startsWith(QLatin1String("\\??\\UNC
")))
The 5.0 code seems to have the same problem
Attachments
Issue Links
- tests
-
QTBUG-73688 Qt doesn't treat UNC paths and NTFS symbolic links correctly
-
- Closed
-
For Gerrit Dashboard: QTBUG-30401 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
258272,10 | Fix resolving NTFS symbolic links that point to UNC shares | 5.12 | qt/qtbase | Status: MERGED | +2 | 0 |