summaryrefslogtreecommitdiff
path: root/libgnome-desktop/gnome-desktop-thumbnail-script.c
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2018-01-16 15:56:53 +0100
committerBastien Nocera <hadess@hadess.net>2018-01-16 15:56:53 +0100
commit4aee87e7bc3270813fbcbd18f0fc1ad4690fcd93 (patch)
tree0e61fbb12ba3349c1fd1ab9b9658bfe61d055f47 /libgnome-desktop/gnome-desktop-thumbnail-script.c
parent9d8c51bc5d8046e062509300f1e1015cc4d26c78 (diff)
downloadgnome-desktop-4aee87e7bc3270813fbcbd18f0fc1ad4690fcd93.tar.gz
thumbnail: Print bwrap command-line in debug
Rather than hide this behind a compile-time condition.
Diffstat (limited to 'libgnome-desktop/gnome-desktop-thumbnail-script.c')
-rw-r--r--libgnome-desktop/gnome-desktop-thumbnail-script.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/libgnome-desktop/gnome-desktop-thumbnail-script.c b/libgnome-desktop/gnome-desktop-thumbnail-script.c
index 960c6399..0ac50f74 100644
--- a/libgnome-desktop/gnome-desktop-thumbnail-script.c
+++ b/libgnome-desktop/gnome-desktop-thumbnail-script.c
@@ -765,6 +765,22 @@ bail:
return NULL;
}
+static void
+print_script_debug (GStrv expanded_script)
+{
+ GString *out;
+ guint i;
+
+ out = g_string_new (NULL);
+
+ for (i = 0; expanded_script[i]; i++)
+ g_string_append_printf (out, "%s ", expanded_script[i]);
+ g_string_append_printf (out, "\n");
+
+ g_debug ("About to launch script: %s", out->str);
+ g_string_free (out, TRUE);
+}
+
GBytes *
gnome_desktop_thumbnail_script_exec (const char *cmd,
int size,
@@ -785,14 +801,7 @@ gnome_desktop_thumbnail_script_exec (const char *cmd,
if (expanded_script == NULL)
goto out;
-#if 0
- guint i;
-
- g_print ("About to launch script: ");
- for (i = 0; expanded_script[i]; i++)
- g_print ("%s ", expanded_script[i]);
- g_print ("\n");
-#endif
+ print_script_debug (expanded_script);
ret = g_spawn_sync (NULL, expanded_script, NULL, G_SPAWN_SEARCH_PATH,
child_setup, exec->fd_array, NULL, &error_out,