Line 0
Link Here
|
|
|
1 |
--- src/archive.cpp.orig 2015-02-25 14:12:33 UTC |
2 |
+++ src/archive.cpp |
3 |
@@ -1,4 +1,5 @@ |
4 |
#include <QMessageBox> |
5 |
+#include <QtGlobal> |
6 |
|
7 |
#include <glib.h> |
8 |
#include <string.h> |
9 |
@@ -161,6 +162,7 @@ static gchar* install_theme_to(const gch |
10 |
GError *e = NULL; |
11 |
gchar *name = NULL; |
12 |
|
13 |
+#if defined(Q_OS_LINUX) |
14 |
argv = g_new(gchar*, 11); |
15 |
argv[0] = g_strdup("tar"); |
16 |
argv[1] = g_strdup("-x"); |
17 |
@@ -173,6 +175,18 @@ static gchar* install_theme_to(const gch |
18 |
argv[8] = g_strdup(to); |
19 |
argv[9] = g_strdup("*/openbox-3/"); |
20 |
argv[10] = NULL; |
21 |
+#else |
22 |
+ argv = g_new(gchar*, 9); |
23 |
+ argv[0] = g_strdup("tar"); |
24 |
+ argv[1] = g_strdup("-x"); |
25 |
+ argv[2] = g_strdup("-v"); |
26 |
+ argv[3] = g_strdup("-z"); |
27 |
+ argv[4] = g_strdup("-f"); |
28 |
+ argv[5] = g_strdup(file); |
29 |
+ argv[6] = g_strdup("-C"); |
30 |
+ argv[7] = g_strdup(to); |
31 |
+ argv[8] = NULL; |
32 |
+#endif |
33 |
if (!g_spawn_sync(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, |
34 |
&outtxt, &errtxt, &exitcode, &e)) |
35 |
QMessageBox::critical(NULL, QString(), QObject::tr("Unable to run the \"tar\" command: %1") |