[nautilus/gnome-2-32] location-entry: don't treat '~' as a relative path
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/gnome-2-32] location-entry: don't treat '~' as a relative path
- Date: Tue, 28 Dec 2010 16:05:07 +0000 (UTC)
commit 5e91bd11bea315b258839890a4ccf4d4b1c49a17
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Fri Dec 17 15:36:36 2010 +0100
location-entry: don't treat '~' as a relative path
Based on a patch by Reed Lipman <rmlipman gmail com>
https://bugzilla.gnome.org/show_bug.cgi?id=628802
src/nautilus-location-entry.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-location-entry.c b/src/nautilus-location-entry.c
index 79270db..b761bfd 100644
--- a/src/nautilus-location-entry.c
+++ b/src/nautilus-location-entry.c
@@ -89,7 +89,7 @@ try_to_expand_path (gpointer callback_data)
user_location_length = g_utf8_strlen (user_location, -1);
entry->details->idle_id = 0;
- if (!g_path_is_absolute (user_location)) {
+ if (!g_path_is_absolute (user_location) && user_location[0] != '~') {
absolute_location = g_build_filename (entry->details->current_directory, user_location, NULL);
suffix = g_filename_completer_get_completion_suffix (entry->details->completer,
absolute_location);
@@ -336,7 +336,7 @@ nautilus_location_entry_activate (GtkEntry *entry)
if (entry_text != NULL && *entry_text != '\0') {
uri_scheme = g_uri_parse_scheme (entry_text);
- if (!g_path_is_absolute (entry_text) && uri_scheme == NULL) {
+ if (!g_path_is_absolute (entry_text) && uri_scheme == NULL && entry_text[0] != '~') {
/* Fix non absolute paths */
full_path = g_build_filename (loc_entry->details->current_directory, entry_text, NULL);
gtk_entry_set_text (entry, full_path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]