[nautilus/gnome-2-32: 204/283] Don't fix relative paths for URIs.



commit aa7962961395bbe83d868a92bdfbac5eb7c89639
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Fri Jun 18 02:10:44 2010 +0200

    Don't fix relative paths for URIs.

 src/nautilus-location-entry.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-location-entry.c b/src/nautilus-location-entry.c
index d7a4db0..79270db 100644
--- a/src/nautilus-location-entry.c
+++ b/src/nautilus-location-entry.c
@@ -328,18 +328,22 @@ nautilus_location_entry_activate (GtkEntry *entry)
 {
 	NautilusLocationEntry *loc_entry;
 	const gchar *entry_text;
-	gchar *full_path;
+	gchar *full_path, *uri_scheme = NULL;
 
 	loc_entry = NAUTILUS_LOCATION_ENTRY (entry);
 	entry_text = gtk_entry_get_text (entry);
 
 	if (entry_text != NULL && *entry_text != '\0') {
-		if (!g_path_is_absolute (entry_text)) {
+		uri_scheme = g_uri_parse_scheme (entry_text);
+
+		if (!g_path_is_absolute (entry_text) && uri_scheme == NULL) {
 			/* Fix non absolute paths */
 			full_path = g_build_filename (loc_entry->details->current_directory, entry_text, NULL);
 			gtk_entry_set_text (entry, full_path);
 			g_free (full_path);
 		}
+
+		g_free (uri_scheme);
 	}
 
 	EEL_CALL_PARENT (GTK_ENTRY_CLASS, activate, (entry));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]