From ff239e9297b6a71d330e1f991bb6d75c2a2353ae Mon Sep 17 00:00:00 2001 From: Patrick Spendrin Date: Sun, 18 Mar 2012 12:49:13 +0100 Subject: [PATCH] remove the : on windows to have a valid path name BUG:287360 (cherry picked from commit 0bf2e7c29aced29450a2ecb87a94e2d31b35f320) --- src/views/viewproperties.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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 { -- 2.47.3