[midori] Add patch to fix private browsing crash. Fixes bug #872393

Kevin Fenzi kevin at fedoraproject.org
Wed Jan 9 22:35:19 UTC 2013


commit a4b20d31d3ad450ac994412304363542fc5b7dab
Author: Kevin Fenzi <kevin at scrye.com>
Date:   Wed Jan 9 15:35:13 2013 -0700

    Add patch to fix private browsing crash. Fixes bug #872393

 midori-0.4.7-private.patch |   43 +++++++++++++++++++++++++++++++++++++++++++
 midori.spec                |    8 +++++++-
 2 files changed, 50 insertions(+), 1 deletions(-)
---
diff --git a/midori-0.4.7-private.patch b/midori-0.4.7-private.patch
new file mode 100644
index 0000000..2673264
--- /dev/null
+++ b/midori-0.4.7-private.patch
@@ -0,0 +1,43 @@
+diff -up midori-0.4.7/katze/midori-paths.vala.private midori-0.4.7/katze/midori-paths.vala
+--- midori-0.4.7/katze/midori-paths.vala.private	2012-10-18 11:19:47.000000000 +0200
++++ midori-0.4.7/katze/midori-paths.vala	2012-10-18 12:25:48.833756721 +0200
+@@ -79,6 +79,9 @@ namespace Midori {
+                     config_dir = cache_dir = user_data_dir = "/";
+                 readonly_dir = config_base ?? Path.build_path (Path.DIR_SEPARATOR_S,
+                     Environment.get_user_config_dir (), PACKAGE_NAME);
++                cache_dir = Path.build_path (Path.DIR_SEPARATOR_S,
++                    Environment.get_user_cache_dir (), PACKAGE_NAME);
++                user_data_dir = Environment.get_user_data_dir ();
+                 tmp_dir = Path.build_path (Path.DIR_SEPARATOR_S,
+                     Environment.get_tmp_dir (), "midori-" + Environment.get_user_name ());
+             }
+@@ -97,15 +100,15 @@ namespace Midori {
+             }
+         }
+ 
+-        public static unowned string get_config_dir () {
+-            assert (config_dir != null);
+-            return config_dir;
++        public static string get_config_dir () {
++            assert (mode != RuntimeMode.UNDEFINED);
++            return readonly_dir ?? config_dir;
+         }
+ 
+         public static string get_config_filename (string filename) {
+             assert (mode != RuntimeMode.UNDEFINED);
+-            assert (config_dir != null);
+-            return Path.build_path (Path.DIR_SEPARATOR_S, config_dir, filename);
++            return Path.build_path (Path.DIR_SEPARATOR_S,
++                readonly_dir ?? config_dir, filename);
+         }
+ 
+         public static unowned string get_cache_dir () {
+@@ -226,7 +229,7 @@ namespace Midori {
+         }
+ 
+         public static string get_preset_filename (string? folder, string filename) {
+-            assert (config_dir != null);
++            assert (exec_path != null);
+ 
+             #if HAVE_WIN32
+             return Path.build_filename (exec_path, "etc", "xdg", PACKAGE_NAME, folder ?? "", filename);
diff --git a/midori.spec b/midori.spec
index 39e4f26..dca7371 100644
--- a/midori.spec
+++ b/midori.spec
@@ -1,6 +1,6 @@
 Name:		midori
 Version:	0.4.7
-Release:	1%{?dist}
+Release:	2%{?dist}
 Summary:	A lightweight GTK+ web browser 
 
 Group:		Applications/Internet
@@ -14,6 +14,8 @@ Source0:	http://archive.xfce.org/src/apps/%{name}/0.4/%{name}-%{version}.tar.bz2
 Patch0: 	%{name}-0.4.7-homepage.patch
 # Remove the private browsing extension group. It's not up to spec
 Patch1:		midori-0.4.7-desktop.patch
+# Fix private browsing crash. 
+Patch2:         midori-0.4.7-private.patch
 
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -67,6 +69,7 @@ developing extensions for %{name}.
 #rm -rf waf
 %patch0 -b .fedora-homepage
 %patch1 -p1 -b .desktop
+%patch2 -p1 -b .private
 
 %build
 export CFLAGS="%{optflags}"
@@ -135,6 +138,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
 
 %changelog
+* Wed Jan 09 2013 Kevin Fenzi <kevin at scrye.com> 0.4.7-2
+- Add patch to fix private browsing crash. Fixes bug #872393
+
 * Wed Sep 19 2012 Kevin Fenzi <kevin at scrye.com> 0.4.7-1
 - Update to 0.4.7
 


More information about the scm-commits mailing list