[gnome-desktop] thumbnail: Print bwrap command-line in debug
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-desktop] thumbnail: Print bwrap command-line in debug
- Date: Tue, 16 Jan 2018 15:39:14 +0000 (UTC)
commit 4aee87e7bc3270813fbcbd18f0fc1ad4690fcd93
Author: Bastien Nocera <hadess hadess net>
Date: Tue Jan 16 15:56:53 2018 +0100
thumbnail: Print bwrap command-line in debug
Rather than hide this behind a compile-time condition.
libgnome-desktop/gnome-desktop-thumbnail-script.c | 25 ++++++++++++++------
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 960c639..0ac50f7 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]