Hello community,

here is the log from the commit of package kde-cli-tools5 for openSUSE:Factory 
checked in at 2016-06-03 16:37:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kde-cli-tools5 (Old)
 and      /work/SRC/openSUSE:Factory/.kde-cli-tools5.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kde-cli-tools5"

Changes:
--------
--- /work/SRC/openSUSE:Factory/kde-cli-tools5/kde-cli-tools5.changes    
2016-05-19 12:11:37.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.kde-cli-tools5.new/kde-cli-tools5.changes       
2016-06-03 16:37:48.000000000 +0200
@@ -1,0 +2,6 @@
+Mon May 30 19:15:56 UTC 2016 - wba...@tmo.at
+
+- Add keditfiletype-create-directory-if-it-doesnt-exist.patch to
+  fix modifying filetypes on fresh user accounts (kde#356237)
+
+-------------------------------------------------------------------

New:
----
  keditfiletype-create-directory-if-it-doesnt-exist.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kde-cli-tools5.spec ++++++
--- /var/tmp/diff_new_pack.mVVSWt/_old  2016-06-03 16:37:49.000000000 +0200
+++ /var/tmp/diff_new_pack.mVVSWt/_new  2016-06-03 16:37:49.000000000 +0200
@@ -28,6 +28,8 @@
 Source99:       %{name}-rpmlintrc
 # PATCH-FIX-OPENSUSE kdesu-add-some-i18n-love.patch -- boo#852256
 Patch0:         kdesu-add-some-i18n-love.patch
+# PATCH-FIX-UPSTREAM keditfiletype-create-directory-if-it-doesnt-exist.patch 
kde#356237 -- fix modifying filetypes on fresh user accounts
+Patch1:         keditfiletype-create-directory-if-it-doesnt-exist.patch
 BuildRequires:  extra-cmake-modules >= 1.3.0
 BuildRequires:  kf5-filesystem
 BuildRequires:  xz
@@ -64,6 +66,7 @@
 %prep
 %setup -q -n kde-cli-tools-%{version}
 %patch0 -p1
+%patch1 -p1
 
 %build
   %cmake_kf5 -d build -- -DCMAKE_INSTALL_LOCALEDIR=share/locale/kf5

++++++ keditfiletype-create-directory-if-it-doesnt-exist.patch ++++++
From: Wolfgang Bauer <wba...@tmo.at>
Date: Mon, 30 May 2016 13:49:31 +0000
Subject: Create ~/.local/share/mime/packages/ if it doesn't exist
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)


Reply via email to