From 60f6361bffb9fd4ac9647f708d3712df2d7e3739dbda91bf131361600f15efd4 Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Fri, 8 Sep 2017 21:18:06 +0000 Subject: [PATCH] - Add upstream patch correctly-return-mimetypes.patch: * Fixes creating top-level folders in KMail (kde#350219) OBS-URL: https://build.opensuse.org/package/show/KDE:Applications/akonadi-server?expand=0&rev=126 --- akonadi-server.changes | 6 ++++++ akonadi-server.spec | 2 ++ correctly-return-mimetypes.patch | 36 ++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 correctly-return-mimetypes.patch diff --git a/akonadi-server.changes b/akonadi-server.changes index 35bcd86..d2ee85a 100644 --- a/akonadi-server.changes +++ b/akonadi-server.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Sep 8 21:17:15 UTC 2017 - lbeltrame@kde.org + +- Add upstream patch correctly-return-mimetypes.patch: + * Fixes creating top-level folders in KMail (kde#350219) + ------------------------------------------------------------------- Thu Sep 07 07:01:08 CEST 2017 - lbeltrame@kde.org diff --git a/akonadi-server.spec b/akonadi-server.spec index c323976..2ed43ea 100644 --- a/akonadi-server.spec +++ b/akonadi-server.spec @@ -31,6 +31,7 @@ Group: System/GUI/KDE Url: http://akonadi-project.org Source: %{rname}-%{version}.tar.xz Source99: akonadi-server-rpmlintrc +Patch0: correctly-return-mimetypes.patch %if 0%{?suse_version} > 1325 BuildRequires: libboost_headers-devel %else @@ -172,6 +173,7 @@ service. %prep %setup -q -n %{rname}-%{version} +%patch0 -p1 %build %cmake_kf5 -d build -- -DINSTALL_QSQLITE_IN_QT_PREFIX=TRUE -DQT_PLUGINS_DIR=%{_kf5_plugindir} diff --git a/correctly-return-mimetypes.patch b/correctly-return-mimetypes.patch new file mode 100644 index 0000000..9e6f82b --- /dev/null +++ b/correctly-return-mimetypes.patch @@ -0,0 +1,36 @@ +From 97a191a5df7b307c70e662996c4846d3d586ff61 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Daniel=20Vr=C3=A1til?= +Date: Fri, 8 Sep 2017 17:09:54 +0200 +Subject: LIST: correctly return mimetypes for all Collections + +LIST was only returning mimetypes for Collections that were resolved in the +initial filter pass. All Collections that were resolved in the second pass +to complete the tree were missing mimetypes, because their IDs were not +passed to the mimetype query. This in included mainly Collections that +don't match the initial mimetype filter, like top-level Collections. + +This caused, among other things, KMail to refuse to create Collections +under the top-level Collection, because the top-level Collections did +not match KMail's mimetype filter (inode/directory). + +BUG: 350219 +FIXED-IN: 5.6.2 +--- + src/server/handler/list.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/server/handler/list.cpp b/src/server/handler/list.cpp +index 2f0584a..bfe8c6b 100644 +--- a/src/server/handler/list.cpp ++++ b/src/server/handler/list.cpp +@@ -428,6 +428,7 @@ void List::retrieveCollections(const Collection &topParent, int depth) + mCollections.insert(missingCol.id(), missingCol); + ancestorIds << missingCol.id(); + attributeIds << missingCol.id(); ++ mimeTypeIds << missingCol.id(); + //We have to do another round if the parents parent is missing + if (missingCol.parentId() != parentId && !mCollections.contains(missingCol.parentId())) { + missingCollections.insert(missingCol.parentId()); +-- +cgit v0.11.2 +