[evolution-data-server/f19] Add patch for RH bug #995702 (Autocreate 'tmp' in maildir)

Milan Crha mcrha at fedoraproject.org
Mon Aug 12 08:32:49 UTC 2013


commit e2cf03a67fa4a733aad947a9b65028ef70b018be
Author: Milan Crha <mcrha at redhat.com>
Date:   Mon Aug 12 10:32:26 2013 +0200

    Add patch for RH bug #995702 (Autocreate 'tmp' in maildir)

 ...-data-server-3.8.5-maildir-tmp-autocreate.patch |   18 ++++++++++++++++++
 evolution-data-server.spec                         |    9 ++++++++-
 2 files changed, 26 insertions(+), 1 deletions(-)
---
diff --git a/evolution-data-server-3.8.5-maildir-tmp-autocreate.patch b/evolution-data-server-3.8.5-maildir-tmp-autocreate.patch
new file mode 100644
index 0000000..05a4811
--- /dev/null
+++ b/evolution-data-server-3.8.5-maildir-tmp-autocreate.patch
@@ -0,0 +1,18 @@
+diff -up evolution-data-server-3.8.5/camel/providers/local/camel-maildir-store.c.maildir-tmp-autocreate evolution-data-server-3.8.5/camel/providers/local/camel-maildir-store.c
+--- evolution-data-server-3.8.5/camel/providers/local/camel-maildir-store.c.maildir-tmp-autocreate	2013-07-23 13:57:51.000000000 +0200
++++ evolution-data-server-3.8.5/camel/providers/local/camel-maildir-store.c	2013-08-12 10:31:18.600063994 +0200
+@@ -506,9 +506,11 @@ scan_fi (CamelStore *store,
+ 	cur = g_build_filename (path, dir_name, "cur", NULL);
+ 	new = g_build_filename (path, dir_name, "new", NULL);
+ 
+-	if (!(g_stat (tmp, &st) == 0 && S_ISDIR (st.st_mode)
+-	      && g_stat (cur, &st) == 0 && S_ISDIR (st.st_mode)
+-	      && g_stat (new, &st) == 0 && S_ISDIR (st.st_mode)))
++	if (!(g_stat (cur, &st) == 0 && S_ISDIR (st.st_mode)
++	      && g_stat (new, &st) == 0 && S_ISDIR (st.st_mode)
++	      /* Create 'tmp' dir on demand, if other directories are there,
++		 because some backup tools can drop the 'tmp' directory. */
++	      && ((g_stat (tmp, &st) == 0 && S_ISDIR (st.st_mode)) || g_mkdir (tmp, 0700) == 0)))
+ 		fi->flags |= CAMEL_FOLDER_NOSELECT;
+ 
+ 	g_free (new);
diff --git a/evolution-data-server.spec b/evolution-data-server.spec
index e62846c..b746f02 100644
--- a/evolution-data-server.spec
+++ b/evolution-data-server.spec
@@ -28,7 +28,7 @@
 
 Name: evolution-data-server
 Version: 3.8.5
-Release: 3%{?dist}
+Release: 4%{?dist}
 Group: System Environment/Libraries
 Summary: Backend data server for Evolution
 License: LGPLv2+
@@ -47,6 +47,9 @@ Patch01: evolution-data-server-1.11.5-fix-64bit-acinclude.patch
 # RH bug #995516
 Patch02: evolution-data-server-3.8.5-cert-viewer-crash.patch
 
+# RH bug #995702
+Patch03: evolution-data-server-3.8.5-maildir-tmp-autocreate.patch
+
 ### Depdencies ###
 
 Requires: dconf
@@ -127,6 +130,7 @@ This package contains developer documentation for %{name}.
 
 %patch01 -p1 -b .fix-64bit-acinclude
 %patch02 -p1 -b .cert-viewer-crash
+%patch03 -p1 -b .maildir-tmp-autocreate
 
 mkdir -p krb5-fakeprefix/include
 mkdir -p krb5-fakeprefix/lib
@@ -375,6 +379,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
 %{_datadir}/gtk-doc/html/libedataserver
 
 %changelog
+* Mon Aug 12 2013 Milan Crha <mcrha at redhat.com> - 3.8.5-4
+- Add patch for RH bug #995702 (Autocreate 'tmp' in maildir)
+
 * Mon Aug 12 2013 Milan Crha <mcrha at redhat.com> - 3.8.5-3
 - Add patch for RH bug #995516 (Crash in certificate viewer)
 


More information about the scm-commits mailing list