]> Dogcows Code - chaz/openbox/commitdiff
convert shit from utf8 to filename before execing it
authorDana Jansens <danakj@orodu.net>
Sat, 24 May 2003 16:15:29 +0000 (16:15 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 24 May 2003 16:15:29 +0000 (16:15 +0000)
openbox/action.c

index d79bf7aec0b86bdda0a6df5495471a8624e3b2a9..9015939e854d5ef1e6fc0f5cc5b204f471cc6772 100644 (file)
@@ -551,11 +551,18 @@ Action *action_from_string(char *name)
 void action_execute(union ActionData *data)
 {
     GError *e = NULL;
-    if (data->execute.path)
-        if (!g_spawn_command_line_async(data->execute.path, &e)) {
-            g_warning("failed to execute '%s': %s",
-                      data->execute.path, e->message);
+    char *cmd;
+    if (data->execute.path) {
+        cmd = g_filename_from_utf8(data->execute.path, -1, NULL, NULL, NULL);
+        if (cmd) {
+            if (!g_spawn_command_line_async(cmd, &e)) {
+                g_warning("failed to execute '%s': %s",
+                          cmd, e->message);
+            }
+        } else {
+            g_warning("failed to convert '%s' from utf8", data->execute.path);
         }
+    }
 }
 
 void action_focus(union ActionData *data)
This page took 0.022051 seconds and 4 git commands to generate.