diff options
author | Pablo Barciela <[email protected]> | 2019-05-02 01:09:20 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-05-06 13:53:37 +0200 |
commit | a110c542bd7a16625f03c97e2fefa3be8da50c85 (patch) | |
tree | 7af078f9084b33eb0d5df7f3657a1f8049ff6b83 /libcaja-private/caja-link.c | |
parent | 476f56a25be636970b336d525a7766b6d1eb3fff (diff) | |
download | caja-a110c542bd7a16625f03c97e2fefa3be8da50c85.tar.bz2 caja-a110c542bd7a16625f03c97e2fefa3be8da50c85.tar.xz |
libcaja-private: reduce the scope of some variables
Diffstat (limited to 'libcaja-private/caja-link.c')
-rw-r--r-- | libcaja-private/caja-link.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libcaja-private/caja-link.c b/libcaja-private/caja-link.c index 8c2902b5..232ee213 100644 --- a/libcaja-private/caja-link.c +++ b/libcaja-private/caja-link.c @@ -200,7 +200,7 @@ caja_link_local_create (const char *directory_uri, gboolean unique_filename) { char *real_directory_uri; - char *uri, *contents; + char *contents; GFile *file; GList dummy_list; CajaFileChangesQueuePosition item; @@ -227,6 +227,8 @@ caja_link_local_create (const char *directory_uri, if (unique_filename) { + char *uri; + uri = caja_ensure_unique_file_name (real_directory_uri, base_name, ".desktop"); if (uri == NULL) @@ -481,7 +483,7 @@ caja_link_get_link_name_from_desktop (GKeyFile *key_file) static char * caja_link_get_link_icon_from_desktop (GKeyFile *key_file) { - char *icon_uri, *icon, *p, *type; + char *icon_uri, *icon, *type; icon_uri = g_key_file_get_string (key_file, MAIN_GROUP, "X-Caja-Icon", NULL); if (icon_uri != NULL) @@ -494,6 +496,8 @@ caja_link_get_link_icon_from_desktop (GKeyFile *key_file) { if (!g_path_is_absolute (icon)) { + char *p; + /* Strip out any extension on non-filename icons. Old desktop files may have this */ p = strchr (icon, '.'); /* Only strip known icon extensions */ |