aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Duchateau <olivierd@FreeBSD.org>2016-08-31 16:13:07 +0000
committerOlivier Duchateau <olivierd@FreeBSD.org>2016-08-31 16:13:07 +0000
commit8c233d0be73a07d74ee7527a1fd33fe3ffb28e3e (patch)
tree4e1c501ebce1f23b0628af6196257dde6da263e6
parent463b6074369c8dba4377acf6cc032d13f5345dc7 (diff)
downloadports-8c233d0be73a07d74ee7527a1fd33fe3ffb28e3e.tar.gz
ports-8c233d0be73a07d74ee7527a1fd33fe3ffb28e3e.zip
MFH: r421122
- Add 2 patches, which avoid crashes: * When renaming files / folders [1] (we use the official patch) * When reloading target file after move - Bump PORTREVISION PR: 208341 Submitted by: Matthias Petermann [1] (obtained from Slackware repository) Tested by: Vladimir Omelchuk Obtained from: Upstream git repository Approved by: ports-secteam (junovitch@)
Notes
Notes: svn path=/branches/2016Q3/; revision=421170
-rw-r--r--x11-fm/thunar/Makefile2
-rw-r--r--x11-fm/thunar/files/patch-thunar_thunar-file.c30
-rw-r--r--x11-fm/thunar/files/patch-thunar_thunar-folder.c49
3 files changed, 80 insertions, 1 deletions
diff --git a/x11-fm/thunar/Makefile b/x11-fm/thunar/Makefile
index ec03490a5c60..50ec82184f74 100644
--- a/x11-fm/thunar/Makefile
+++ b/x11-fm/thunar/Makefile
@@ -3,7 +3,7 @@
PORTNAME= Thunar
PORTVERSION= 1.6.10
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= x11-fm xfce
MASTER_SITES= XFCE/src/xfce/${PORTNAME:tl}/${PORTVERSION:R}
DIST_SUBDIR= xfce4
diff --git a/x11-fm/thunar/files/patch-thunar_thunar-file.c b/x11-fm/thunar/files/patch-thunar_thunar-file.c
new file mode 100644
index 000000000000..bc73151de506
--- /dev/null
+++ b/x11-fm/thunar/files/patch-thunar_thunar-file.c
@@ -0,0 +1,30 @@
+--- thunar/thunar-file.c.orig 2015-05-22 13:25:36 UTC
++++ thunar/thunar-file.c
+@@ -795,13 +795,15 @@ thunar_file_monitor (GFileMonitor *m
+ if (event_type == G_FILE_MONITOR_EVENT_MOVED)
+ {
+ /* reload the target file if cached */
++ if (other_path == NULL)
++ return;
+ other_file = thunar_file_cache_lookup (other_path);
+ if (other_file)
+ thunar_file_reload (other_file);
+ else
+ other_file = thunar_file_get (other_path, NULL);
+
+- if (!other_file)
++ if (other_file == NULL)
+ return;
+
+ /* notify the thumbnail cache that we can now also move the thumbnail */
+@@ -3918,7 +3920,9 @@ thunar_file_unwatch (ThunarFile *file)
+ gboolean
+ thunar_file_reload (ThunarFile *file)
+ {
+- _thunar_return_if_fail (THUNAR_IS_FILE (file));
++ /* if the file has already been destroyed, break here */
++ if (!THUNAR_IS_FILE (file))
++ return FALSE;
+
+ /* clear file pxmap cache */
+ thunar_icon_factory_clear_pixmap_cache (file);
diff --git a/x11-fm/thunar/files/patch-thunar_thunar-folder.c b/x11-fm/thunar/files/patch-thunar_thunar-folder.c
new file mode 100644
index 000000000000..8abd0a99b943
--- /dev/null
+++ b/x11-fm/thunar/files/patch-thunar_thunar-folder.c
@@ -0,0 +1,49 @@
+--- thunar/thunar-folder.c.orig 2015-05-22 13:25:36 UTC
++++ thunar/thunar-folder.c
+@@ -773,27 +773,30 @@ thunar_folder_monitor (GFileMonitor
+ {
+ /* destroy the old file and update the new one */
+ thunar_file_destroy (lp->data);
+- file = thunar_file_get(other_file, NULL);
+- if (file != NULL && THUNAR_IS_FILE (file))
++ if (other_file != NULL)
+ {
+- thunar_file_reload (file);
+-
+- /* if source and target folders are different, also tell
+- the target folder to reload for the changes */
+- if (thunar_file_has_parent (file))
++ file = thunar_file_get(other_file, NULL);
++ if (file != NULL && THUNAR_IS_FILE (file))
+ {
+- other_parent = thunar_file_get_parent (file, NULL);
+- if (other_parent &&
+- !g_file_equal (thunar_file_get_file(folder->corresponding_file),
+- thunar_file_get_file(other_parent)))
++ thunar_file_reload (file);
++
++ /* if source and target folders are different, also tell
++ the target folder to reload for the changes */
++ if (thunar_file_has_parent (file))
+ {
+- thunar_file_reload (other_parent);
+- g_object_unref (other_parent);
++ other_parent = thunar_file_get_parent (file, NULL);
++ if (other_parent &&
++ !g_file_equal (thunar_file_get_file(folder->corresponding_file),
++ thunar_file_get_file(other_parent)))
++ {
++ thunar_file_reload (other_parent);
++ g_object_unref (other_parent);
++ }
+ }
+- }
+
+- /* drop reference on the other file */
+- g_object_unref (file);
++ /* drop reference on the other file */
++ g_object_unref (file);
++ }
+ }
+
+ /* reload the folder of the source file */