diff options
author | Pablo Barciela <[email protected]> | 2019-06-14 09:30:32 +0200 |
---|---|---|
committer | ZenWalker <[email protected]> | 2019-06-17 15:18:27 +0200 |
commit | ef29013fdfd0df5d4a3cc6c5a8fb1583aabef952 (patch) | |
tree | 51c2c4afb9259ec97ba3303591bbc8e946f277d9 /src/caja-location-entry.c | |
parent | cbd6b367e9b05c08bff88ee1cfa03c09c7ee2558 (diff) | |
download | caja-ef29013fdfd0df5d4a3cc6c5a8fb1583aabef952.tar.bz2 caja-ef29013fdfd0df5d4a3cc6c5a8fb1583aabef952.tar.xz |
src: reduce the scope of some variables
Diffstat (limited to 'src/caja-location-entry.c')
-rw-r--r-- | src/caja-location-entry.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/caja-location-entry.c b/src/caja-location-entry.c index 0a288408..0df8d44e 100644 --- a/src/caja-location-entry.c +++ b/src/caja-location-entry.c @@ -84,7 +84,7 @@ try_to_expand_path (gpointer callback_data) { CajaLocationEntry *entry; GtkEditable *editable; - char *suffix, *user_location, *absolute_location, *uri_scheme; + char *suffix, *user_location, *uri_scheme; int user_location_length, pos; entry = CAJA_LOCATION_ENTRY (callback_data); @@ -97,6 +97,8 @@ try_to_expand_path (gpointer callback_data) if (!g_path_is_absolute (user_location) && uri_scheme == NULL && user_location[0] != '~') { + char *absolute_location; + absolute_location = g_build_filename (entry->details->current_directory, user_location, NULL); suffix = g_filename_completer_get_completion_suffix (entry->details->completer, absolute_location); @@ -359,7 +361,7 @@ caja_location_entry_activate (GtkEntry *entry) { CajaLocationEntry *loc_entry; const gchar *entry_text; - gchar *full_path, *uri_scheme = NULL; + gchar *uri_scheme = NULL; loc_entry = CAJA_LOCATION_ENTRY (entry); entry_text = gtk_entry_get_text (entry); @@ -370,6 +372,8 @@ caja_location_entry_activate (GtkEntry *entry) if (!g_path_is_absolute (entry_text) && uri_scheme == NULL && entry_text[0] != '~') { + gchar *full_path; + /* Fix non absolute paths */ full_path = g_build_filename (loc_entry->details->current_directory, entry_text, NULL); gtk_entry_set_text (entry, full_path); |