Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Maintenance:5683
kde-cli-tools5.openSUSE_13.2_Update
keditfiletype-create-directory.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File keditfiletype-create-directory.patch of Package kde-cli-tools5.openSUSE_13.2_Update
From: Wolfgang Bauer <wbauer@tmo.at> Date: Mon, 30 May 2016 13:49:31 +0000 Subject: Create ~/.local/share/mime/packages/ if it doesn't exist X-Git-Tag: v5.6.5 X-Git-Url: http://quickgit.kde.org/?p=kde-cli-tools.git&a=commitdiff&h=c2aa2a46d51793d26dc6e93e60b5933cb1193e56 --- Create ~/.local/share/mime/packages/ if it doesn't exist QStandardDirs::writableLocation() doesn't guarantee that the returned directory actually exists. So create it, otherwise saving the changes will fail if it isn't there. BUG: 356237 FIXED-IN: 5.6.5 REVIEW: 128055 --- --- a/keditfiletype/mimetypewriter.cpp +++ b/keditfiletype/mimetypewriter.cpp @@ -21,6 +21,7 @@ #include "mimetypewriter.h" #include <QDebug> +#include <QDir> #include <QFile> #include <QMimeDatabase> #include <QMimeType> @@ -146,7 +147,10 @@ // and in ~/.local we don't really expect other packages to be installed anyway... QString baseName = m_mimeType; baseName.replace('/', '-'); - return QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("/mime/") + "packages/" + baseName + ".xml" ; + QString packagesDirName = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("/mime/") + "packages/"; + // create the directory, the saving will fail if it doesn't exist (bug#356237) + QDir(packagesDirName).mkpath(QStringLiteral(".")); + return packagesDirName + baseName + ".xml" ; } static QString existingDefinitionFile(const QString& mimeType)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor