summaryrefslogtreecommitdiff
path: root/Command/WebApp.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-02-09 16:34:42 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-02-09 16:34:42 -0400
commit8d34737ac0693bb448f016f195d5082dc8e6d3df (patch)
tree9fd148a62fb67fcd80d8932092c1bb9142bb7560 /Command/WebApp.hs
parent3d35840552b8b81e34c208672fe830c821c5ec16 (diff)
webapp: Fix reversion in opening webapp when starting it manually inside a repository.
Diffstat (limited to 'Command/WebApp.hs')
-rw-r--r--Command/WebApp.hs9
1 files changed, 7 insertions, 2 deletions
diff --git a/Command/WebApp.hs b/Command/WebApp.hs
index 1c7bcfaa7..46ba556a3 100644
--- a/Command/WebApp.hs
+++ b/Command/WebApp.hs
@@ -195,10 +195,15 @@ recordUrl _ = noop
#endif
openBrowser :: Maybe FilePath -> FilePath -> String -> Maybe Handle -> Maybe Handle -> IO ()
+openBrowser mcmd htmlshim realurl outh errh = do
+ htmlshim' <- absPath htmlshim
+ openBrowser' mcmd htmlshim' realurl outh errh
+
+openBrowser' :: Maybe FilePath -> FilePath -> String -> Maybe Handle -> Maybe Handle -> IO ()
#ifndef __ANDROID__
-openBrowser mcmd htmlshim _realurl outh errh = runbrowser
+openBrowser' mcmd htmlshim _realurl outh errh = runbrowser
#else
-openBrowser mcmd htmlshim realurl outh errh = do
+openBrowser' mcmd htmlshim realurl outh errh = do
recordUrl url
{- Android's `am` command does not work reliably across the
- wide range of Android devices. Intead, FIFO should be set to