webapp: Fix reversion in opening webapp when starting it manually inside a repository.

This commit is contained in:
Joey Hess 2015-02-09 16:34:42 -04:00
parent 4422922cf4
commit bcf1b59c1b
3 changed files with 11 additions and 4 deletions

View file

@ -195,10 +195,15 @@ recordUrl _ = noop
#endif
openBrowser :: Maybe FilePath -> FilePath -> String -> Maybe Handle -> Maybe Handle -> IO ()
#ifndef __ANDROID__
openBrowser mcmd htmlshim _realurl outh errh = runbrowser
#else
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
#else
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