commit f30f390e513e456c2bdec64726469a50097e4371
Author: Simon Howard <fraggle@soulsphere.org>
AuthorDate: Thu Jun 4 01:07:36 2015 -0400
Commit: Simon Howard <fraggle@soulsphere.org>
CommitDate: Thu Jun 4 01:07:36 2015 -0400
textscreen: Tweak to command line to open URL.
Alexandre-Xavier commented in #520 that the 'start' command line to
open help URLs doesn't work. According to this page, 'start' is
actually a cmd.exe built-in and can't be shelled out to directly:
http://www.dwheeler.com/essays/open-files-urls.html
This prepends cmd /c to the 'start' command; hopefully this should
work. It might still be non-ideal if it causes a cmd.exe window to
briefly pop up; in the long term we should probably switch to the
ShellExecute() API function instead.
---
textscreen/txt_window.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/textscreen/txt_window.c b/textscreen/txt_window.c
index bd892ac9..5aa35edf 100644
--- a/textscreen/txt_window.c
+++ b/textscreen/txt_window.c
@@ -516,7 +516,7 @@ void TXT_OpenURL(char *url)
cmd = malloc(cmd_len);
#if defined(_WIN32)
- TXT_snprintf(cmd, cmd_len, "start \"%s\"", url);
+ TXT_snprintf(cmd, cmd_len, "cmd /c start \"%s\"", url);
#elif defined(__MACOSX__)
TXT_snprintf(cmd, cmd_len, "open \"%s\"", url);
#else