Windows: Fix opening webapp when repository is in a directory with spaces in the path.

This commit is contained in:
Joey Hess 2014-06-10 18:29:15 -04:00
parent d4e71929ba
commit 6eb5e6c135
3 changed files with 17 additions and 2 deletions

View file

@ -61,6 +61,10 @@ browserProc url = proc "am"
["start", "-a", "android.intent.action.VIEW", "-d", url]
#else
#ifdef mingw32_HOST_OS
-- Warning: On Windows, no quoting or escaping of the url seems possible,
-- so spaces in it will cause problems. One approach is to make the url
-- be a relative filename, and adjust the returned CreateProcess to change
-- to the directory it's in.
browserProc url = proc "cmd" ["/c start " ++ url]
#else
browserProc url = proc "xdg-open" [url]