# HG changeset patch # User Richard Laager # Date 1132325387 0 # Node ID 9f34340f244555acbfb1a2358d50d38bd9cd1612 # Parent 8254bb99f92986eb21ad57cf02623079c21b6a46 [gaim-migrate @ 14434] Smiley theme unpacking fixes: Squash a warning about not checking the return value of system() Add some more shell escaping committer: Tailor Script diff -r 8254bb99f929 -r 9f34340f2445 src/gtkprefs.c --- a/src/gtkprefs.c Fri Nov 18 13:54:20 2005 +0000 +++ b/src/gtkprefs.c Fri Nov 18 14:49:47 2005 +0000 @@ -464,7 +464,7 @@ static void theme_install_theme(char *path, char *extn) { #ifndef _WIN32 - gchar *command, *escaped; + gchar *command; #endif gchar *destdir; gchar *tail; @@ -485,9 +485,11 @@ * other platforms, if need be */ if (!g_ascii_strcasecmp(tail, ".gz") || !g_ascii_strcasecmp(tail, ".tgz")) { #ifndef _WIN32 - escaped = g_shell_quote(path); - command = g_strdup_printf("tar > /dev/null xzf %s -C %s", escaped, destdir); - g_free(escaped); + gchar *path_escaped = g_shell_quote(path); + gchar *destdir_escaped = g_shell_quote(destdir); + command = g_strdup_printf("tar > /dev/null xzf %s -C %s", path_escaped, destdir_escaped); + g_free(path_escaped); + g_free(destdir_escaped); #else if(!wgaim_gz_untar(path, destdir)) { g_free(destdir); @@ -502,7 +504,10 @@ #ifndef _WIN32 /* Fire! */ - system(command); + if (system(command)) + { + gaim_notify_error(NULL, NULL, _("Smiley theme failed to unpack."), NULL); + } g_free(command); #endif