webapp: Fix reversion in opening webapp when starting it manually inside a repository.
This commit is contained in:
parent
4422922cf4
commit
bcf1b59c1b
3 changed files with 11 additions and 4 deletions
|
@ -115,7 +115,7 @@ getFileBrowserR = whenM openFileBrowser redirectBack
|
||||||
- blocking the response to the browser on it. -}
|
- blocking the response to the browser on it. -}
|
||||||
openFileBrowser :: Handler Bool
|
openFileBrowser :: Handler Bool
|
||||||
openFileBrowser = do
|
openFileBrowser = do
|
||||||
path <- liftAnnex $ fromRepo Git.repoPath
|
path <- liftIO . absPath =<< liftAnnex (fromRepo Git.repoPath)
|
||||||
#ifdef darwin_HOST_OS
|
#ifdef darwin_HOST_OS
|
||||||
let cmd = "open"
|
let cmd = "open"
|
||||||
let p = proc cmd [path]
|
let p = proc cmd [path]
|
||||||
|
|
|
@ -195,10 +195,15 @@ recordUrl _ = noop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
openBrowser :: Maybe FilePath -> FilePath -> String -> Maybe Handle -> Maybe Handle -> IO ()
|
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
|
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
|
recordUrl url
|
||||||
{- Android's `am` command does not work reliably across the
|
{- Android's `am` command does not work reliably across the
|
||||||
- wide range of Android devices. Intead, FIFO should be set to
|
- wide range of Android devices. Intead, FIFO should be set to
|
||||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -14,6 +14,8 @@ git-annex (5.20150206) UNRELEASED; urgency=medium
|
||||||
or --duplicate mode.
|
or --duplicate mode.
|
||||||
* Windows: Fix bug in dropping an annexed file, which
|
* Windows: Fix bug in dropping an annexed file, which
|
||||||
caused a symlink to be staged that contained backslashes.
|
caused a symlink to be staged that contained backslashes.
|
||||||
|
* webapp: Fix reversion in opening webapp when starting it manually
|
||||||
|
inside a repository.
|
||||||
|
|
||||||
-- Joey Hess <id@joeyh.name> Fri, 06 Feb 2015 13:57:08 -0400
|
-- Joey Hess <id@joeyh.name> Fri, 06 Feb 2015 13:57:08 -0400
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue