41 lines
1.3 KiB
Diff
41 lines
1.3 KiB
Diff
From b10717e1634128f08009c11f0a570888ee314350 Mon Sep 17 00:00:00 2001
|
|
From: Tomas Bzatek <tbzatek@redhat.com>
|
|
Date: Mon, 2 Nov 2009 17:10:47 +0100
|
|
Subject: [PATCH] Fall back to display parent folder info when selection is invalid
|
|
|
|
See bug 590591.
|
|
---
|
|
src/nautilus-information-panel.c | 9 +++++++--
|
|
1 files changed, 7 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/nautilus-information-panel.c b/src/nautilus-information-panel.c
|
|
index ce162ef..03e398b 100644
|
|
--- a/src/nautilus-information-panel.c
|
|
+++ b/src/nautilus-information-panel.c
|
|
@@ -1114,15 +1114,20 @@ selection_changed_callback (NautilusWindowInfo *window,
|
|
selection = nautilus_window_info_get_selection (window);
|
|
selection_count = g_list_length (selection);
|
|
|
|
+ file = NULL;
|
|
+
|
|
if (selection_count == 1) {
|
|
selection = nautilus_window_info_get_selection (window);
|
|
selected = selection->data;
|
|
|
|
- /* this should never fail here, as we're displaying the file */
|
|
+ /* FIXME: in some cases we're unable to get a NautilusFile
|
|
+ for the selected file. See bug 590591 for details. */
|
|
file = nautilus_file_get_existing (selected);
|
|
+ }
|
|
+
|
|
+ if (file) {
|
|
uri = nautilus_file_get_uri (file);
|
|
name = nautilus_file_get_display_name (file);
|
|
-
|
|
nautilus_file_unref (file);
|
|
} else {
|
|
uri = nautilus_window_info_get_current_location (window);
|
|
--
|
|
1.6.5.1
|
|
|