about summary refs log tree commit diff stats
path: root/src/xmpp/avatar.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-05-20 14:15:53 +0200
committerGitHub <noreply@github.com>2020-05-20 14:15:53 +0200
commit7862542c58cf8319b1609b01c24deedb797854fe (patch)
tree3f87ef6e933d4a6df49c0fd4e8a319618ef46444 /src/xmpp/avatar.c
parent7d7f0ef5a5a40257996df52aaff58599fddd11d5 (diff)
parent7b541d0a6d196499712f4e7c9854aa294ac16167 (diff)
downloadprofani-tty-7862542c58cf8319b1609b01c24deedb797854fe.tar.gz
Merge pull request #1341 from profanity-im/feature/urlopen
Add urlopen command
Diffstat (limited to 'src/xmpp/avatar.c')
-rw-r--r--src/xmpp/avatar.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/xmpp/avatar.c b/src/xmpp/avatar.c
index 9d043cb3..701d6cb7 100644
--- a/src/xmpp/avatar.c
+++ b/src/xmpp/avatar.c
@@ -266,15 +266,7 @@ _avatar_request_item_result_handler(xmpp_stanza_t *const stanza, void *const use
 
     // if we shall open it
     if (g_hash_table_contains(shall_open, from_attr)) {
-        GString *cmd = g_string_new("");
-
-        g_string_append_printf(cmd, "%s %s > /dev/null 2>&1", prefs_get_string(PREF_AVATAR_CMD), filename->str);
-        cons_show("Calling: %s", cmd->str);
-        FILE *stream = popen(cmd->str, "r");
-
-        pclose(stream);
-        g_string_free(cmd, TRUE);
-
+        call_external(prefs_get_string(PREF_AVATAR_CMD), filename->str);
         g_hash_table_remove(shall_open, from_attr);
     }