summaryrefslogtreecommitdiff
path: root/src/nautilus-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nautilus-file.c')
-rw-r--r--src/nautilus-file.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/nautilus-file.c b/src/nautilus-file.c
index 37f189f8c..5865c3229 100644
--- a/src/nautilus-file.c
+++ b/src/nautilus-file.c
@@ -8581,10 +8581,29 @@ nautilus_file_emit_changed (NautilusFile *file)
link_files = get_link_files (file);
for (p = link_files; p != NULL; p = p->next)
{
- if (p->data != file)
+ /* Looking for directly recursive links. */
+ g_autolist (NautilusFile) link_targets = NULL;
+ NautilusDirectory *directory;
+
+ if (p->data == file)
+ {
+ continue;
+ }
+
+ link_targets = get_link_files (p->data);
+ directory = nautilus_file_get_directory (p->data);
+
+ /* Reiterating (heh) that this will break with more complex cycles.
+ * Users, stop trying to break things on purpose.
+ */
+ if (g_list_find (link_targets, file) != NULL &&
+ directory == nautilus_file_get_directory (file))
{
- nautilus_file_changed (NAUTILUS_FILE (p->data));
+ g_signal_emit (p->data, signals[CHANGED], 0, p->data);
+ continue;
}
+
+ nautilus_file_changed (NAUTILUS_FILE (p->data));
}
nautilus_file_list_free (link_files);
}