diff options
| author | Patrick Spendrin <[email protected]> | 2012-03-18 12:49:13 +0100 |
|---|---|---|
| committer | Patrick Spendrin <[email protected]> | 2012-03-18 12:50:48 +0100 |
| commit | ff239e9297b6a71d330e1f991bb6d75c2a2353ae (patch) | |
| tree | eace4b6ae83b3aaa13b50920d80b8809fb795065 /src | |
| parent | d6e10a5942442f8423385ff1301c9163b334e4ed (diff) | |
remove the : on windows to have a valid path name
BUG:287360
(cherry picked from commit 0bf2e7c29aced29450a2ecb87a94e2d31b35f320)
Diffstat (limited to 'src')
| -rw-r--r-- | src/views/viewproperties.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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 { |
