Details
Description
With Qt 4.6.0 QFileInfo::canonicalPath() no longer produces the right output for NTFS junction points.
My configuration (both Win2k and Win7x64) is:
- (hd0,0) -> C:
- (hd0,1) -> D: AND C:\Users\Username
I. e. (hd0,1) is also mounted on my user's profile directory.
When I try to get a canonical path of some C:\Users\Username\path\to\file the result is Volume
It seems like the file "C:\Users\Username" is considered as a symlink, i. e. QFileInfo::isSymlink() returns true and QFileInfo::target() returns "Volume{ ### }
", so during the canonicalization the filename becomes as said above. With previous Qt version this was not true, it was not considered as a symlink.
I am not sure whether that kind of path should be considered a symlink or not, anyway now it does not work.
I have also found this page http://support.microsoft.com/kb/205524/en-us that says that the true target should be \\?\Volume
, with the leading \ \ ? \
For now I found a workaround by reverting the QFileInfo implementation back as the 4.5.3 one. Actually I simply commented out these four lines in file src/corelib/io/qfsfileengine_win.cpp
// Lines 1585 - 1586: // if ((type & LinkType) && d->isSymlink()) // ret |= LinkType; // Lines 1699 - 1700: // else if (d->doStat() && d->isSymlink()) // ret = readSymLink(d->filePath);
Attachments
Issue Links
- is required for
-
QTBUG-4557 qmake on Symbian can "see through" Windows junctions
-
- Closed
-
- replaces
-
QTBUG-7384 reparse points on windows fool QDir::canonicalPath
-
- Closed
-
- resulted in
-
QTCREATORBUG-398 (Vista) Cannot handle Paths to mounted devices
-
- Closed
-