diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-04-23 17:02:17 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-24 19:36:55 +0200 |
commit | fd7e1cef9cc06a2e36d98942c6e929ee5589952e (patch) | |
tree | c08811ec7cab66920b413e81f0836928f795e28d /src/corelib/io | |
parent | 1eebbacb86ffb6e8cb291e316d4133320b459e42 (diff) |
Don't strip the leading slash of letter+colon paths on Unix
It's perfectly valid to have a path of /c:/a.txt on Unix, so don't
strip the leading slash unless we're on Windows.
Task-number: QTBUG-20322
Change-Id: I721bd0a65b41048bc735d4eaa0d536174164fe64
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qurl.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 3b6a7ea169..ca74544e55 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -2510,9 +2510,11 @@ QString QUrl::toLocalFile() const ? QLatin1Char('/') + ourPath : ourPath); } else { tmp = ourPath; +#ifdef Q_OS_WIN // magic for drives on windows if (ourPath.length() > 2 && ourPath.at(0) == QLatin1Char('/') && ourPath.at(2) == QLatin1Char(':')) tmp.remove(0, 1); +#endif } return tmp; |