summaryrefslogtreecommitdiff
path: root/openbox
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-05-24 16:15:29 +0000
committerDana Jansens <danakj@orodu.net>2003-05-24 16:15:29 +0000
commit3753a0ed3eb1f10d8579dc20098504484003e8bf (patch)
tree5c5bed6f74e5de687544bbe852bab8261da9e60a /openbox
parentd2857b11944146e2e6973b7f7280cb57e1ee260b (diff)
convert shit from utf8 to filename before execing it
Diffstat (limited to 'openbox')
-rw-r--r--openbox/action.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/openbox/action.c b/openbox/action.c
index d79bf7ae..9015939e 100644
--- a/openbox/action.c
+++ b/openbox/action.c
@@ -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)