diff options
| author | David Faure <[email protected]> | 2012-11-28 16:40:07 +0100 |
|---|---|---|
| committer | David Faure <[email protected]> | 2012-11-28 16:40:07 +0100 |
| commit | 6a3f8086a372ca1c21ab474c7934e8f8e4b238f5 (patch) | |
| tree | 9fc387067f0728ff3837b366c7e7976312312908 /src/views | |
| parent | a39ba0acd81c55b217ef71b24617f42531a08285 (diff) | |
| parent | b2719884b9cdd31b293e785aebabddabf374383d (diff) | |
Merge remote-tracking branch 'origin/KDE/4.9'
Diffstat (limited to 'src/views')
| -rw-r--r-- | src/views/viewproperties.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/views/viewproperties.cpp b/src/views/viewproperties.cpp index ff0c274be..30deb7277 100644 --- a/src/views/viewproperties.cpp +++ b/src/views/viewproperties.cpp @@ -69,8 +69,13 @@ ViewProperties::ViewProperties(const KUrl& url) : useDetailsViewWithPath = true; } else if (url.isLocalFile()) { m_filePath = url.toLocalFile(); - const QFileInfo info(m_filePath); - if (!info.isWritable() || !isPartOfHome(m_filePath)) { + const QFileInfo dirInfo(m_filePath); + const QFileInfo fileInfo(m_filePath + QDir::separator() + ViewPropertiesFileName); + // Check if the directory is writable and check if the ".directory" file exists and + // is read- and writable. + if (!dirInfo.isWritable() + || (fileInfo.exists() && !(fileInfo.isReadable() && fileInfo.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(':')); |
