From a73c496aa67f349c7f601ca7e7428e5ea8d4f964 Mon Sep 17 00:00:00 2001 From: Quentin Stievenart Date: Sun, 11 Aug 2013 17:27:32 -0400 Subject: [PATCH] Don't use --wildcards in the tar commandon BSD. The flag does not exist there, though the default behaviour is the same. --- src/archive.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/archive.c b/src/archive.c index 1264627..0ae392e 100644 --- a/src/archive.c +++ b/src/archive.c @@ -170,6 +170,8 @@ static gchar* install_theme_to(const gchar *file, const gchar *to) GError *e = NULL; gchar *name = NULL; +#ifdef __linux__ + /* Assume we're using GNU tar. */ argv = g_new(gchar*, 11); argv[0] = g_strdup("tar"); argv[1] = g_strdup("-x"); @@ -182,6 +184,19 @@ static gchar* install_theme_to(const gchar *file, const gchar *to) argv[8] = g_strdup(to); argv[9] = g_strdup("*/openbox-3/"); argv[10] = NULL; +#else + argv = g_new(gchar*, 10); + argv[0] = g_strdup("tar"); + argv[1] = g_strdup("-x"); + argv[2] = g_strdup("-v"); + argv[3] = g_strdup("-z"); + argv[4] = g_strdup("-f"); + argv[5] = g_strdup(file); + argv[6] = g_strdup("-C"); + argv[7] = g_strdup(to); + argv[8] = g_strdup("*/openbox-3/"); + argv[9] = NULL; +#endif if (!g_spawn_sync(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, &outtxt, &errtxt, &exitcode, &e)) gtk_msg(GTK_MESSAGE_ERROR, _("Unable to run the \"tar\" command: %s"), -- 2.39.2