svn commit: r421170 - in branches/2016Q3/x11-fm/thunar: . files
Olivier Duchateau
olivierd at FreeBSD.org
Wed Aug 31 16:13:09 UTC 2016
Author: olivierd
Date: Wed Aug 31 16:13:07 2016
New Revision: 421170
URL: https://svnweb.freebsd.org/changeset/ports/421170
Log:
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@)
Added:
branches/2016Q3/x11-fm/thunar/files/patch-thunar_thunar-file.c
- copied unchanged from r421122, head/x11-fm/thunar/files/patch-thunar_thunar-file.c
branches/2016Q3/x11-fm/thunar/files/patch-thunar_thunar-folder.c
- copied unchanged from r421122, head/x11-fm/thunar/files/patch-thunar_thunar-folder.c
Modified:
branches/2016Q3/x11-fm/thunar/Makefile
Directory Properties:
branches/2016Q3/ (props changed)
Modified: branches/2016Q3/x11-fm/thunar/Makefile
==============================================================================
--- branches/2016Q3/x11-fm/thunar/Makefile Wed Aug 31 15:40:45 2016 (r421169)
+++ branches/2016Q3/x11-fm/thunar/Makefile Wed Aug 31 16:13:07 2016 (r421170)
@@ -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
Copied: branches/2016Q3/x11-fm/thunar/files/patch-thunar_thunar-file.c (from r421122, head/x11-fm/thunar/files/patch-thunar_thunar-file.c)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/2016Q3/x11-fm/thunar/files/patch-thunar_thunar-file.c Wed Aug 31 16:13:07 2016 (r421170, copy of r421122, head/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);
Copied: branches/2016Q3/x11-fm/thunar/files/patch-thunar_thunar-folder.c (from r421122, head/x11-fm/thunar/files/patch-thunar_thunar-folder.c)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/2016Q3/x11-fm/thunar/files/patch-thunar_thunar-folder.c Wed Aug 31 16:13:07 2016 (r421170, copy of r421122, head/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 */
More information about the svn-ports-branches
mailing list