summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-01-05 13:00:45 +0100
committerStefano Karapetsas <[email protected]>2012-01-05 13:00:45 +0100
commit63a4ddb0bb1d98b54dd962831e4ca95365bc7123 (patch)
treecbabf05df70a9576c72a5fe088cafc2e6e38c7ad
parent637b3475d9c8b5ff7c4dbf863c9c6b5953a6150b (diff)
downloadcaja-63a4ddb0bb1d98b54dd962831e4ca95365bc7123.tar.bz2
caja-63a4ddb0bb1d98b54dd962831e4ca95365bc7123.tar.xz
location-entry: don't treat '~' as a relative path
Based on a patch by Reed Lipman <[email protected]> https://bugzilla.gnome.org/show_bug.cgi?id=628802 http://git.gnome.org/browse/nautilus/commit/?h=gnome-2-32&id=5e91bd11bea315b258839890a4ccf4d4b1c49a17
-rw-r--r--libcaja-private/caja-icon-info.c2
-rw-r--r--src/caja-location-entry.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/libcaja-private/caja-icon-info.c b/libcaja-private/caja-icon-info.c
index 4d9b4aae..e9596d8f 100644
--- a/libcaja-private/caja-icon-info.c
+++ b/libcaja-private/caja-icon-info.c
@@ -425,7 +425,7 @@ caja_icon_info_lookup (GIcon *icon,
/* 96_no-null-in-g-str-hash.patch from ubuntu natty nautilus
https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/718098 */
if (filename == NULL) {
- gtk_icon_info_free (gtkicon_info);
+ gtk_icon_info_free (gtkicon_info);
return caja_icon_info_new_for_pixbuf (NULL);
}
/* patch end */
diff --git a/src/caja-location-entry.c b/src/caja-location-entry.c
index 03557337..a1db4fb8 100644
--- a/src/caja-location-entry.c
+++ b/src/caja-location-entry.c
@@ -90,7 +90,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,
@@ -361,7 +361,7 @@ caja_location_entry_activate (GtkEntry *entry)
{
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);