diff --git a/src/filefetchjob.cpp b/src/filefetchjob.cpp --- a/src/filefetchjob.cpp +++ b/src/filefetchjob.cpp @@ -21,6 +21,7 @@ #include "filefetchjob.h" #include "filemetadatautil_p.h" +#include #include #include @@ -57,6 +58,9 @@ } else { m_canEditAll = false; } + if (m_canEditAll) { + m_canEditAll = QFileInfo(filePath).isWritable(); + } m_data << prop; } diff --git a/src/indexeddataretriever.cpp b/src/indexeddataretriever.cpp --- a/src/indexeddataretriever.cpp +++ b/src/indexeddataretriever.cpp @@ -65,8 +65,7 @@ KFileMetaData::UserMetaData umd(m_url); if (umd.isSupported()) { - // FIXME - check writable - m_canEdit = true; + m_canEdit = QFileInfo(m_url).isWritable(); QVariantMap attributes = Baloo::Private::convertUserMetaData(umd); m_data.unite(attributes);