Commit 15384429 authored by Robert Ancell's avatar Robert Ancell

Use g_build_filename instead of a printf

parent f15cffb4
......@@ -183,9 +183,10 @@ gs_plugin_app_install (GsPlugin *plugin, GsApp *app,
return FALSE;
/* symlink it to somewhere the shell will notice */
app_desktop = g_strdup_printf ("%s/applications/%s",
g_get_user_data_dir (),
gs_app_get_id (app));
app_desktop = g_build_filename (g_get_user_data_dir (),
"applications",
gs_app_get_id (app),
NULL);
symlink_desktop = g_file_new_for_path (app_desktop);
ret = g_file_make_symbolic_link (symlink_desktop,
epi_desktop,
......@@ -228,9 +229,10 @@ gs_plugin_app_remove (GsPlugin *plugin, GsApp *app,
/* remove the shared desktop file */
basename = g_file_get_basename (file_epi);
app_desktop = g_strdup_printf ("%s/applications/%s",
g_get_user_data_dir (),
gs_app_get_id (app));
app_desktop = g_build_filename (g_get_user_data_dir (),
"applications",
gs_app_get_id (app),
NULL);
file_app = g_file_new_for_path (app_desktop);
if (!g_file_delete (file_app, NULL, error))
return FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment