+ 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)) {