From: Patrick Spendrin Date: Sun, 18 Mar 2012 11:49:13 +0000 (+0100) Subject: remove the : on windows to have a valid path name X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/ff239e9297b6a71d330e1f991bb6d75c2a2353ae remove the : on windows to have a valid path name BUG:287360 (cherry picked from commit 0bf2e7c29aced29450a2ecb87a94e2d31b35f320) --- diff --git a/src/views/viewproperties.cpp b/src/views/viewproperties.cpp index 10e420c85..8588bb238 100644 --- a/src/views/viewproperties.cpp +++ b/src/views/viewproperties.cpp @@ -66,6 +66,10 @@ ViewProperties::ViewProperties(const KUrl& url) : m_filePath = url.toLocalFile(); const QFileInfo info(m_filePath); if (!info.isWritable() || !isPartOfHome(m_filePath)) { +#ifdef Q_OS_WIN + // m_filePath probably begins with C:/ - the colon is not a valid character for paths though + m_filePath = QDir::separator() + m_filePath.remove(QLatin1Char(':')); +#endif m_filePath = destinationDir("local") + m_filePath; } } else {