aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core.c b/src/core.c
index 380137b7..d6c5f243 100644
--- a/src/core.c
+++ b/src/core.c
@@ -1823,14 +1823,17 @@ int StorageLoadValue(int position)
void OpenURL(const char *url)
{
char *cmd = calloc(10 + strlen(url), sizeof(char));
+
#if defined(_WIN32)
strcpy(cmd, "explorer ");
+ strcat(cmd, url);
#elif defined(__linux__)
- strcpy(cmd, "xdg-open "); // Alternatives: firefox, x-www-browser
+ sprintf(cmd, "xdg-open '%s'", url); // Alternatives: firefox, x-www-browser
#elif defined(__APPLE__)
strcpy(cmd, "open ");
-#endif
strcat(cmd, url);
+#endif
+
system(cmd);
free(cmd);
}