path: root/src
diff options
authorAndy Shaw <>2014-02-21 15:21:24 +0100
committerThe Qt Project <>2014-03-04 15:59:05 +0100
commitf07841bc7c621d3bca01c4f2dc11cf62c11b30d5 (patch)
tree54d91eb7cb8a7595848c04f8063f4e99d95c0a70 /src
parent4b2f35d04ca3c2e037b4d0edd8b2350051cc572c (diff)
Revert path() behavior to not expand a current path on a drive
In the original change - cfb44c6528b2518274bf157388832d1d610ce0e4 - when querying for the path of a file that did not contain a slash after the drive indicator it would get the current path and return that as the path that the file resided on. However this meant that it would take the current path at that time which may not be the actual path that was expected. So it was decided that it should revert back to the original behavior which was to just return the drive letter followed by the colon which would thus indicate still that it represented whatever the current path was on that drive. Change-Id: Ic57ae9227882a66e9a4c4d6537d7f2cae829165a Reviewed-by: Thiago Macieira <> Reviewed-by: Oswald Buddenhagen <>
Diffstat (limited to 'src')
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qfilesystementry.cpp b/src/corelib/io/qfilesystementry.cpp
index 42a724670e..5365ca9bcc 100644
--- a/src/corelib/io/qfilesystementry.cpp
+++ b/src/corelib/io/qfilesystementry.cpp
@@ -195,7 +195,7 @@ QString QFileSystemEntry::path() const
if (m_lastSeparator == -1) {
#if defined(Q_OS_WIN)
if (m_filePath.length() >= 2 && == QLatin1Char(':'))
- return QFSFileEngine::currentPath(m_filePath.left(2));
+ return m_filePath.left(2);
return QString(QLatin1Char('.'));