diff -Nru thunar-1.6.11/debian/changelog thunar-1.6.11/debian/changelog --- thunar-1.6.11/debian/changelog 2017-02-15 21:47:31.000000000 +0000 +++ thunar-1.6.11/debian/changelog 2017-03-05 10:20:40.000000000 +0000 @@ -1,18 +1,51 @@ -thunar (1.6.11-0ubuntu1) devel; urgency=medium +thunar (1.6.11-1) unstable; urgency=medium - * New upstream bugfix release. - - Drop patches from upstream. + * New upstream release. + * debian/patches: + - 0001-Fix-crash-and-hang-while-renaming, + 0001-Fix-object-unreferencing-Bug-12260, + 0002-Don-t-call-g_object_ref-unref-on-objects-that-are-be removed, + included upstream. + * debian/control: + - update dbus-x11 recommends to default-dbus-session-bus | + dbus-session-bus. closes: #836043 - -- Unit 193 Wed, 15 Feb 2017 16:47:31 -0500 + -- Yves-Alexis Perez Sun, 05 Mar 2017 11:20:40 +0100 -thunar (1.6.10-2ubuntu1) xenial; urgency=medium +thunar (1.6.10-6) unstable; urgency=medium - [ Unit 193 ] - * Add upstream patches to reduce crashes on file move. - - d/p/02_Fix-crashes-when-reloading-target-file-after-move.patch - - d/p/03_Fixing-missing-return-value-in-standard-view.patch + * debian/patches: + - 0001-Fix-object-unreferencing-Bug-12260 added, fix more crashes when + moving files. closes: #800723 - -- Sean Davis Tue, 19 Apr 2016 22:09:41 -0400 + -- Yves-Alexis Perez Sun, 12 Feb 2017 12:04:24 +0100 + +thunar (1.6.10-5) unstable; urgency=medium + + * debian/patches: + - 0001-Fix-crash-and-hang-while-renaming and + 0002-Don-t-call-g_object_ref-unref-on-objects-that-are-be added, new + attempt at closing the move/rename crash. closes: #818484 + + -- Yves-Alexis Perez Fri, 10 Feb 2017 14:55:40 +0100 + +thunar (1.6.10-4) unstable; urgency=medium + + * debian/patches: + - 02_handle-folder-change-events-with-file-info-synchronization disabled + because of regression (freeze when accessing a different fs) + closes: #840254 + + -- Yves-Alexis Perez Tue, 11 Oct 2016 22:05:54 +0200 + +thunar (1.6.10-3) unstable; urgency=medium + + * debian/patches: + - 02_handle-folder-change-events-with-file-info-synchronization added, fix + thunar segfaults in some cases when moving files. closes: #818484 + * Remove menu files since we have a desktop file. + + -- Yves-Alexis Perez Sat, 08 Oct 2016 15:04:24 +0200 thunar (1.6.10-2) unstable; urgency=medium diff -Nru thunar-1.6.11/debian/control thunar-1.6.11/debian/control --- thunar-1.6.11/debian/control 2016-01-30 01:40:49.000000000 +0000 +++ thunar-1.6.11/debian/control 2017-02-25 15:38:06.000000000 +0000 @@ -1,8 +1,7 @@ Source: thunar Section: xfce Priority: optional -Maintainer: Xubuntu Developers -XSBC-Original-Maintainer: Debian Xfce Maintainers +Maintainer: Debian Xfce Maintainers Uploaders: Yves-Alexis Perez , Lionel Le Folgoc Build-Depends: debhelper (>= 9), libexo-1-dev (>= 0.10.0), libxml-parser-perl, @@ -38,7 +37,7 @@ Section: xfce Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, desktop-file-utils, shared-mime-info, thunar-data (= ${source:Version}), exo-utils -Recommends: dbus-x11, ${shlibs:Recommends}, thunar-volman [linux-any], tumbler, +Recommends: default-dbus-session-bus | dbus-session-bus, ${shlibs:Recommends}, thunar-volman [linux-any], tumbler, xdg-user-dirs, gvfs Suggests: thunar-archive-plugin, thunar-media-tags-plugin Breaks: thunar-data (<< 1.2.3-3) diff -Nru thunar-1.6.11/debian/patches/0001-Don-t-copy-templates-but-create-them-bug-8312.patch thunar-1.6.11/debian/patches/0001-Don-t-copy-templates-but-create-them-bug-8312.patch --- thunar-1.6.11/debian/patches/0001-Don-t-copy-templates-but-create-them-bug-8312.patch 2013-05-21 21:54:01.000000000 +0000 +++ thunar-1.6.11/debian/patches/0001-Don-t-copy-templates-but-create-them-bug-8312.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,256 +0,0 @@ -From 372d5d61b987c7fd1dfd5eed67955f90db9f125e Mon Sep 17 00:00:00 2001 -From: Nick Schermer -Date: Sat, 29 Sep 2012 15:50:16 +0200 -Subject: [PATCH] Don't copy templates but create them (bug #8312). - -Instead of copying templates, create new files and allow -to feed a template file. It is then easy with -g_output_stream_splice to feed the template data into -the new file. - -This way the new file has the template data, but not -any of the attributes (timestamps etc). ---- - thunar/thunar-application.c | 27 ++++++++++++++------------ - thunar/thunar-application.h | 1 + - thunar/thunar-io-jobs.c | 42 ++++++++++++++++++++++++++++++++++++----- - thunar/thunar-io-jobs.h | 3 ++- - thunar/thunar-standard-view.c | 13 ++++--------- - 5 files changed, 59 insertions(+), 27 deletions(-) - -diff --git a/thunar/thunar-application.c b/thunar/thunar-application.c -index c6dc674..94762ac 100644 ---- a/thunar/thunar-application.c -+++ b/thunar/thunar-application.c -@@ -1414,7 +1414,7 @@ thunar_application_create_file (ThunarApplication *application, - if (is_directory) - thunar_application_mkdir (application, screen, &path_list, NULL); - else -- thunar_application_creat (application, screen, &path_list, NULL); -+ thunar_application_creat (application, screen, &path_list, NULL, NULL); - - g_object_unref (path_list.data); - g_free (name); -@@ -1444,7 +1444,6 @@ thunar_application_create_file_from_template (ThunarApplication *application, - GdkScreen *screen, - const gchar *startup_id) - { -- GList source_path_list; - GList target_path_list; - gchar *name; - gchar *title; -@@ -1468,18 +1467,15 @@ thunar_application_create_file_from_template (ThunarApplication *application, - title); - if (G_LIKELY (name != NULL)) - { -- /* fake the source file list */ -- source_path_list.data = thunar_file_get_file (template_file); -- source_path_list.prev = source_path_list.next = NULL; -- - /* fake the target path list */ - target_path_list.data = g_file_get_child (thunar_file_get_file (parent_directory), name); - target_path_list.next = target_path_list.prev = NULL; - - /* launch the operation */ -- thunar_application_copy_to (application, screen, -- &source_path_list, &target_path_list, -- NULL); -+ thunar_application_creat (application, screen, -+ &target_path_list, -+ thunar_file_get_file (template_file), -+ NULL); - - /* release the target path */ - g_object_unref (target_path_list.data); -@@ -1817,10 +1813,11 @@ thunar_application_trash (ThunarApplication *application, - - - static ThunarJob * --creat_stub (GList *source_path_list, -+creat_stub (GList *template_file, - GList *target_path_list) - { -- return thunar_io_jobs_create_files (source_path_list); -+ _thunar_return_val_if_fail (template_file->data == NULL || G_IS_FILE (template_file->data), NULL); -+ return thunar_io_jobs_create_files (target_path_list, template_file->data); - } - - -@@ -1842,15 +1839,21 @@ void - thunar_application_creat (ThunarApplication *application, - gpointer parent, - GList *file_list, -+ GFile *template_file, - GClosure *new_files_closure) - { -+ GList template_list; -+ - _thunar_return_if_fail (parent == NULL || GDK_IS_SCREEN (parent) || GTK_IS_WIDGET (parent)); - _thunar_return_if_fail (THUNAR_IS_APPLICATION (application)); - -+ template_list.next = template_list.prev = NULL; -+ template_list.data = template_file; -+ - /* launch the operation */ - thunar_application_launch (application, parent, "document-new", - _("Creating files..."), creat_stub, -- file_list, file_list, new_files_closure); -+ &template_list, file_list, new_files_closure); - } - - -diff --git a/thunar/thunar-application.h b/thunar/thunar-application.h -index 50845a3..f674544 100644 ---- a/thunar/thunar-application.h -+++ b/thunar/thunar-application.h -@@ -127,6 +127,7 @@ void thunar_application_trash (ThunarApplic - void thunar_application_creat (ThunarApplication *application, - gpointer parent, - GList *file_list, -+ GFile *template_file, - GClosure *new_files_closure); - - void thunar_application_mkdir (ThunarApplication *application, -diff --git a/thunar/thunar-io-jobs.c b/thunar/thunar-io-jobs.c -index a90ab69..6db1b8b 100644 ---- a/thunar/thunar-io-jobs.c -+++ b/thunar/thunar-io-jobs.c -@@ -96,18 +96,33 @@ _thunar_io_jobs_create (ThunarJob *job, - GList *lp; - gchar *base_name; - gchar *display_name; -+ GFile *template_file; -+ GFileInputStream *template_stream = NULL; - - _thunar_return_val_if_fail (THUNAR_IS_JOB (job), FALSE); - _thunar_return_val_if_fail (param_values != NULL, FALSE); -- _thunar_return_val_if_fail (param_values->n_values == 1, FALSE); -+ _thunar_return_val_if_fail (param_values->n_values == 2, FALSE); - _thunar_return_val_if_fail (error == NULL || *error == NULL, FALSE); - - /* get the file list */ - file_list = g_value_get_boxed (g_value_array_get_nth (param_values, 0)); -+ template_file = g_value_get_object (g_value_array_get_nth (param_values, 1)); - - /* we know the total amount of files to be processed */ - thunar_job_set_total_files (THUNAR_JOB (job), file_list); - -+ /* check if we need to open the template */ -+ if (template_file != NULL) -+ { -+ /* open read stream to feed in the new files */ -+ template_stream = g_file_read (template_file, exo_job_get_cancellable (EXO_JOB (job)), &err); -+ if (G_UNLIKELY (template_stream == NULL)) -+ { -+ g_propagate_error (error, err); -+ return FALSE; -+ } -+ } -+ - /* iterate over all files in the list */ - for (lp = file_list; - err == NULL && lp != NULL && !exo_job_is_cancelled (EXO_JOB (job)); -@@ -197,9 +212,24 @@ again: - } - } - else -- g_object_unref (stream); -+ { -+ if (template_stream != NULL) -+ { -+ /* write the template into the new file */ -+ g_output_stream_splice (G_OUTPUT_STREAM (stream), -+ G_INPUT_STREAM (template_stream), -+ G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, -+ exo_job_get_cancellable (EXO_JOB (job)), -+ NULL); -+ } -+ -+ g_object_unref (stream); -+ } - } - -+ if (template_stream != NULL) -+ g_object_unref (template_stream); -+ - /* check if we have failed */ - if (err != NULL) - { -@@ -220,10 +250,12 @@ again: - - - ThunarJob * --thunar_io_jobs_create_files (GList *file_list) -+thunar_io_jobs_create_files (GList *file_list, -+ GFile *template_file) - { -- return thunar_simple_job_launch (_thunar_io_jobs_create, 1, -- THUNAR_TYPE_G_FILE_LIST, file_list); -+ return thunar_simple_job_launch (_thunar_io_jobs_create, 2, -+ THUNAR_TYPE_G_FILE_LIST, file_list, -+ G_TYPE_FILE, template_file); - } - - -diff --git a/thunar/thunar-io-jobs.h b/thunar/thunar-io-jobs.h -index 11d9c0d..51dc682 100644 ---- a/thunar/thunar-io-jobs.h -+++ b/thunar/thunar-io-jobs.h -@@ -26,7 +26,8 @@ - - G_BEGIN_DECLS - --ThunarJob *thunar_io_jobs_create_files (GList *file_list) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; -+ThunarJob *thunar_io_jobs_create_files (GList *file_list, -+ GFile *template_file) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; - ThunarJob *thunar_io_jobs_make_directories (GList *file_list) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; - ThunarJob *thunar_io_jobs_unlink_files (GList *file_list) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; - ThunarJob *thunar_io_jobs_move_files (GList *source_file_list, -diff --git a/thunar/thunar-standard-view.c b/thunar/thunar-standard-view.c -index 6a90e41..ebb2151 100644 ---- a/thunar/thunar-standard-view.c -+++ b/thunar/thunar-standard-view.c -@@ -1875,7 +1875,7 @@ thunar_standard_view_action_create_empty_file (GtkAction *action, - - /* launch the operation */ - application = thunar_application_get (); -- thunar_application_creat (application, GTK_WIDGET (standard_view), &path_list, -+ thunar_application_creat (application, GTK_WIDGET (standard_view), &path_list, NULL, - thunar_standard_view_new_files_closure (standard_view, NULL)); - g_object_unref (application); - -@@ -1941,7 +1941,6 @@ thunar_standard_view_action_create_template (GtkAction *action, - { - ThunarApplication *application; - ThunarFile *current_directory; -- GList source_path_list; - GList target_path_list; - gchar *name; - gchar *title; -@@ -1965,11 +1964,6 @@ thunar_standard_view_action_create_template (GtkAction *action, - current_directory = thunar_navigator_get_current_directory (THUNAR_NAVIGATOR (standard_view)); - if (G_LIKELY (current_directory != NULL)) - { -- /* fake the source path list */ -- source_path_list.data = thunar_file_get_file (file); -- source_path_list.next = NULL; -- source_path_list.prev = NULL; -- - /* fake the target path list */ - target_path_list.data = g_file_get_child (thunar_file_get_file (current_directory), name); - target_path_list.next = NULL; -@@ -1977,8 +1971,9 @@ thunar_standard_view_action_create_template (GtkAction *action, - - /* launch the operation */ - application = thunar_application_get (); -- thunar_application_copy_to (application, GTK_WIDGET (standard_view), &source_path_list, &target_path_list, -- thunar_standard_view_new_files_closure (standard_view, NULL)); -+ thunar_application_creat (application, GTK_WIDGET (standard_view), &target_path_list, -+ thunar_file_get_file (file), -+ thunar_standard_view_new_files_closure (standard_view, NULL)); - g_object_unref (G_OBJECT (application)); - - /* release the target path */ --- -1.7.10.4 - diff -Nru thunar-1.6.11/debian/patches/02_handle-folder-change-events-with-file-info-synchronization.patch thunar-1.6.11/debian/patches/02_handle-folder-change-events-with-file-info-synchronization.patch --- thunar-1.6.11/debian/patches/02_handle-folder-change-events-with-file-info-synchronization.patch 1970-01-01 00:00:00.000000000 +0000 +++ thunar-1.6.11/debian/patches/02_handle-folder-change-events-with-file-info-synchronization.patch 2016-10-08 12:32:52.000000000 +0000 @@ -0,0 +1,300 @@ +From: Roy Richardson +Date: Sat, 19 Aug 2016 10:14:48 +0100 +Subject: Handle folder change events with file info synchronization +Origin: https://bugzilla.xfce.org/attachment.cgi?id=6779 +Upstream-bug: https://bugzilla.xfce.org/show_bug.cgi?id=12264 + +diff -up a/thunar/thunar-file.c b/thunar/thunar-file.c +--- a/thunar/thunar-file.c 2015-05-22 13:25:36.000000000 +0000 ++++ b/thunar/thunar-file.c 2016-08-20 10:04:15.196666669 +0000 +@@ -121,6 +121,7 @@ static gboolean thunar_file_sa + + G_LOCK_DEFINE_STATIC (file_cache_mutex); + G_LOCK_DEFINE_STATIC (file_content_type_mutex); ++G_LOCK_DEFINE_STATIC (file_info_mutex); + + + +@@ -699,7 +700,7 @@ thunar_file_move_thumbnail_cache_file (G + + + static void +-thunar_file_monitor_moved (ThunarFile *file, ++thunar_file_renamed (ThunarFile *file, + GFile *renamed_file) + { + GFile *previous_file; +@@ -777,12 +778,6 @@ thunar_file_monitor (GFileMonitor *m + + if (g_file_equal (event_path, file->gfile)) + { +- /* the event occurred for the monitored ThunarFile */ +- if (event_type == G_FILE_MONITOR_EVENT_MOVED) +- { +- thunar_file_monitor_moved (file, other_path); +- return; +- } + + if (G_LIKELY (event_path)) + thunar_file_monitor_update (event_path, event_type); +@@ -792,26 +787,7 @@ thunar_file_monitor (GFileMonitor *m + /* The event did not occur for the monitored ThunarFile, but for + a file that is contained in ThunarFile which is actually a + directory. */ +- if (event_type == G_FILE_MONITOR_EVENT_MOVED) +- { +- /* reload the target file if cached */ +- 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) +- return; +- +- /* notify the thumbnail cache that we can now also move the thumbnail */ +- thunar_file_move_thumbnail_cache_file (event_path, other_path); +- +- /* reload the containing target folder */ +- thunar_file_reload_parent (other_file); +- +- g_object_unref (other_file); +- } + return; + } + } +@@ -850,8 +826,9 @@ thunar_file_watch_reconnect (ThunarFile + g_object_unref (file_watch->monitor); + } + +- /* create a file or directory monitor */ +- file_watch->monitor = g_file_monitor (file->gfile, G_FILE_MONITOR_WATCH_MOUNTS | G_FILE_MONITOR_SEND_MOVED, NULL, NULL); ++ /* create a file monitor */ ++ file_watch->monitor = g_file_monitor (file->gfile, G_FILE_MONITOR_WATCH_MOUNTS, NULL, NULL); ++ + if (G_LIKELY (file_watch->monitor != NULL)) + { + /* watch monitor for file changes */ +@@ -1085,6 +1062,9 @@ thunar_file_get_async_finish (GObject + + _thunar_return_if_fail (G_IS_FILE (location)); + _thunar_return_if_fail (G_IS_ASYNC_RESULT (result)); ++ ++ /* setup lock to begin changes to file info */ ++ G_LOCK (file_info_mutex); + + /* finish querying the file information */ + file_info = g_file_query_info_finish (location, result, &error); +@@ -1126,6 +1106,9 @@ thunar_file_get_async_finish (GObject + /* release the file, see description in ThunarFileGetFunc */ + g_object_unref (file); + ++ /* release lock on finished changes to file info */ ++ G_UNLOCK (file_info_mutex); ++ + /* free the error, if there is any */ + if (error != NULL) + g_error_free (error); +@@ -1164,6 +1147,9 @@ thunar_file_load (ThunarFile *file, + _thunar_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), FALSE); + _thunar_return_val_if_fail (G_IS_FILE (file->gfile), FALSE); + ++ /* setup lock to begin changes to file info */ ++ G_LOCK (file_info_mutex); ++ + /* reset the file */ + thunar_file_info_clear (file); + +@@ -1185,6 +1171,9 @@ thunar_file_load (ThunarFile *file, + g_clear_error (&err); + } + ++ /* release lock on finished changes to file info */ ++ G_UNLOCK (file_info_mutex); ++ + if (err != NULL) + { + g_propagate_error (error, err); +@@ -1299,6 +1288,9 @@ thunar_file_get_with_info (GFile *gf + file = g_object_new (THUNAR_TYPE_FILE, NULL); + file->gfile = g_object_ref (gfile); + ++ /* setup lock to begin changes to file info */ ++ G_LOCK (file_info_mutex); ++ + /* reset the file */ + thunar_file_info_clear (file); + +@@ -1311,6 +1303,9 @@ thunar_file_get_with_info (GFile *gf + /* update the mounted info */ + if (not_mounted) + FLAG_UNSET (file, THUNAR_FILE_FLAG_IS_MOUNTED); ++ ++ /* release lock on finished changes to file info */ ++ G_UNLOCK (file_info_mutex); + + /* setup lock until the file is inserted */ + G_LOCK (file_cache_mutex); +@@ -1932,8 +1927,8 @@ thunar_file_rename (ThunarFile *file, + /* check if we succeeded */ + if (renamed_file != NULL) + { +- /* notify the file is renamed */ +- thunar_file_monitor_moved (file, renamed_file); ++ /* the file is renamed */ ++ thunar_file_renamed (file, renamed_file); + + g_object_unref (G_OBJECT (renamed_file)); + +@@ -3851,8 +3846,8 @@ thunar_file_watch (ThunarFile *file) + file_watch = g_slice_new (ThunarFileWatch); + file_watch->watch_count = 1; + +- /* create a file or directory monitor */ +- file_watch->monitor = g_file_monitor (file->gfile, G_FILE_MONITOR_WATCH_MOUNTS | G_FILE_MONITOR_SEND_MOVED, NULL, NULL); ++ /* create a file monitor */ ++ file_watch->monitor = g_file_monitor (file->gfile, G_FILE_MONITOR_WATCH_MOUNTS, NULL, NULL); + if (G_LIKELY (file_watch->monitor != NULL)) + { + /* watch monitor for file changes */ +diff -up a/thunar/thunar-folder.c b/thunar/thunar-folder.c +--- a/thunar/thunar-folder.c 2015-05-22 13:25:36.000000000 +0000 ++++ b/thunar/thunar-folder.c 2016-08-20 10:01:40.786666669 +0000 +@@ -569,7 +569,7 @@ thunar_folder_finished (ExoJob *jo + + /* add us to the file alteration monitor */ + folder->monitor = g_file_monitor_directory (thunar_file_get_file (folder->corresponding_file), +- G_FILE_MONITOR_SEND_MOVED, NULL, NULL); ++ G_FILE_MONITOR_WATCH_MOVES, NULL, NULL); + if (G_LIKELY (folder->monitor != NULL)) + g_signal_connect (folder->monitor, "changed", G_CALLBACK (thunar_folder_monitor), folder); + +@@ -713,6 +713,7 @@ thunar_folder_monitor (GFileMonitor + ThunarFolder *folder = THUNAR_FOLDER (user_data); + ThunarFile *file; + ThunarFile *other_parent; ++ ThunarFile *destroyed; + GList *lp; + GList list; + gboolean restart = FALSE; +@@ -723,40 +724,47 @@ thunar_folder_monitor (GFileMonitor + _thunar_return_if_fail (folder->job == NULL); + _thunar_return_if_fail (THUNAR_IS_FILE (folder->corresponding_file)); + _thunar_return_if_fail (G_IS_FILE (event_file)); +- ++ + /* check on which file the event occurred */ ++ /* if the event_file is not the folders corresponding file */ + if (!g_file_equal (event_file, thunar_file_get_file (folder->corresponding_file))) + { + /* check if we already ship the file */ + for (lp = folder->files; lp != NULL; lp = lp->next) + if (g_file_equal (event_file, thunar_file_get_file (lp->data))) +- break; ++ break; + + /* stop the content type collector */ + if (folder->content_type_idle_id != 0) + restart = g_source_remove (folder->content_type_idle_id); + +- /* if we don't have it, add it if the event is not an "deleted" event */ +- if (G_UNLIKELY (lp == NULL && event_type != G_FILE_MONITOR_EVENT_DELETED)) ++ /* ++ * if we don't have the file and event type is created or moved in. ++ */ ++ if (lp == NULL) + { +- /* allocate a file for the path */ +- file = thunar_file_get (event_file, NULL); +- if (G_UNLIKELY (file != NULL)) ++ if (event_type == G_FILE_MONITOR_EVENT_CREATED ++ || event_type == G_FILE_MONITOR_EVENT_MOVED_IN) + { +- /* prepend it to our internal list */ +- folder->files = g_list_prepend (folder->files, file); +- +- /* tell others about the new file */ +- list.data = file; list.next = list.prev = NULL; +- g_signal_emit (G_OBJECT (folder), folder_signals[FILES_ADDED], 0, &list); ++ /* allocate a file for the path */ ++ file = thunar_file_get (event_file, NULL); ++ ++ if (file != NULL) ++ { ++ /* prepend it to our internal list */ ++ folder->files = g_list_prepend (folder->files, file); ++ ++ /* tell others about the new file */ ++ list.data = file; list.next = list.prev = NULL; ++ g_signal_emit (G_OBJECT (folder), folder_signals[FILES_ADDED], 0, &list); ++ } + } + } +- else if (lp != NULL) ++ else /* lp != NULL we have the file */ + { +- if (event_type == G_FILE_MONITOR_EVENT_DELETED) ++ if (event_type == G_FILE_MONITOR_EVENT_DELETED ++ || event_type == G_FILE_MONITOR_EVENT_MOVED_OUT) + { +- ThunarFile *destroyed; +- + /* destroy the file */ + thunar_file_destroy (lp->data); + +@@ -768,27 +776,44 @@ thunar_folder_monitor (GFileMonitor + g_object_unref (destroyed); + } + } +- +- else if (event_type == G_FILE_MONITOR_EVENT_MOVED) ++ else if (event_type == G_FILE_MONITOR_EVENT_RENAMED) + { +- /* destroy the old file and update the new one */ ++ /* destroy the old file */ + thunar_file_destroy (lp->data); ++ ++ /* if the file has not been destroyed by now, reload it to invalidate it */ ++ destroyed = thunar_file_cache_lookup (event_file); ++ if (destroyed != NULL) ++ { ++ thunar_file_reload (destroyed); ++ g_object_unref (destroyed); ++ } ++ ++ /* update the new one */ + file = thunar_file_get(other_file, NULL); ++ + if (file != NULL && THUNAR_IS_FILE (file)) + { + thunar_file_reload (file); + +- /* if source and target folders are different, also tell +- the target folder to reload for the changes */ ++ /* ++ * if source and target folders are different, also tell ++ * the target folder to reload for the changes ++ */ + if (thunar_file_has_parent (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))) ++ if (other_parent != NULL) + { +- thunar_file_reload (other_parent); +- g_object_unref (other_parent); ++ if (!g_file_equal ( ++ thunar_file_get_file (folder->corresponding_file), ++ thunar_file_get_file (other_parent))) ++ { ++ thunar_file_reload (other_parent); ++ } ++ ++ /* drop reference on the other parent */ ++ g_object_unref (other_parent); + } + } + diff -Nru thunar-1.6.11/debian/thunar.menu thunar-1.6.11/debian/thunar.menu --- thunar-1.6.11/debian/thunar.menu 2007-12-04 16:48:05.000000000 +0000 +++ thunar-1.6.11/debian/thunar.menu 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -?package(thunar):needs="X11" section="Applications/File Management"\ - title="Thunar" longtitle="Xfce4 File Manager" hints="File manager" command="/usr/bin/thunar"