diff options
author | Michael Vetter <jubalh@iodoru.org> | 2020-06-03 13:20:25 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2020-06-03 13:20:25 +0200 |
commit | b7d5b964a2e7d94d7019463358e2b53338feaa4b (patch) | |
tree | 8b8b0269346f908e86c045cf3abdf404aafaa82a /src/command | |
parent | f1fe18b47442aed5a0b427bc9450bd7111ec7314 (diff) | |
parent | fad77d9d70b405d307c85ced27796c052ace050d (diff) | |
download | profani-tty-b7d5b964a2e7d94d7019463358e2b53338feaa4b.tar.gz |
Merge remote-tracking branch 'peetah/externalCallWithGSpawnSync' into
peetah-external-cmd Merge peetahs external command calling improvements from his mirror at https://framagit.org/peetah/profanity.
Diffstat (limited to 'src/command')
-rw-r--r-- | src/command/cmd_funcs.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 55082765..59702fe3 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -4900,7 +4900,7 @@ cmd_sendfile(ProfWin *window, const char *const command, gchar **args) free(filename); return TRUE; } - + if (access(filename, R_OK) != 0) { cons_show_error("Uploading '%s' failed: File not found!", filename); free(filename); @@ -8921,9 +8921,10 @@ cmd_urlopen(ProfWin *window, const char *const command, gchar **args) return TRUE; } - gchar* cmd = prefs_get_string(PREF_URL_OPEN_CMD); - call_external(cmd, args[0]); - g_free(cmd); + gchar *argv[] = {prefs_get_string(PREF_URL_OPEN_CMD), args[0], NULL}; + if (!call_external(argv, NULL, NULL)) { + cons_show_error("Unable to open url: check the logs for more information."); + } } else { cons_show("urlopen not supported in this window"); } |