]> cloud.milkyroute.net Git - dolphin.git/commitdiff
remove the : on windows to have a valid path name
authorPatrick Spendrin <ps_ml@gmx.de>
Sun, 18 Mar 2012 11:49:13 +0000 (12:49 +0100)
committerPatrick Spendrin <ps_ml@gmx.de>
Sun, 18 Mar 2012 11:50:48 +0000 (12:50 +0100)
BUG:287360
(cherry picked from commit 0bf2e7c29aced29450a2ecb87a94e2d31b35f320)

src/views/viewproperties.cpp

index 10e420c859b06a77e18c8d65e7680171a33b90d8..8588bb238c80f11f54d76b1daa5ef6fa6f392521 100644 (file)
@@ -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 {