summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2023-01-30 08:33:11 +0100
committerOndrej Holy <oholy@redhat.com>2023-04-06 10:40:31 +0200
commit106ab7594f0d1d493ea951a67f9f69bfb710684c (patch)
tree741d6e2ca7c701deffef2c4379dbeafd0e94246b
parente00de88a3dd049dbc013f461880d65e1d0957379 (diff)
downloadnautilus-106ab7594f0d1d493ea951a67f9f69bfb710684c.tar.gz
window-slot: Add comment for viewed_file_changed_callback logic
Let's document the recently changed behavior of when the current location is marked as gone to make the code easier to understand.
-rw-r--r--src/nautilus-window-slot.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index de2d86e18..4b2ca173c 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -1447,6 +1447,13 @@ viewed_file_changed_callback (NautilusFile *file,
GMount *mount;
gboolean find_existing = TRUE;
+ /* If the current location disappears, the following code jumps to
+ * the first existing parent except in the case when the file
+ * resides on some of the user interesting mounts and the mount was
+ * unmounted. In that case, it jumps to the home directory to avoid
+ * jumping into the runtime dir.
+ */
+
location = nautilus_file_get_location (file);
if (g_file_is_native (location))