fix webapp opening in termux

Open real url not html shim since android and file:// urls is a nasty
kettle of fish.

This commit was sponsored by John Pellman on Patreon.
This commit is contained in:
Joey Hess 2018-04-25 14:38:42 -04:00
parent b0df331b4a
commit 9807e5bead
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 40 additions and 27 deletions

View file

@ -38,6 +38,7 @@ import Config
import Utility.Gpg
import qualified Remote.GCrypt as GCrypt
import qualified Types.Remote
import Utility.Android
import qualified Data.Text as T
import qualified Data.Map as M
@ -144,10 +145,6 @@ defaultRepositoryPath firstrun = do
legit d = not <$> doesFileExist (d </> "git-annex")
#endif
-- Detect when the Linux build is running on Android, eg in termux.
osAndroid :: IO Bool
osAndroid = ("Android" == ) <$> readProcess "uname" ["-o"]
newRepositoryForm :: FilePath -> Hamlet.Html -> MkMForm RepositoryPath
newRepositoryForm defpath msg = do
(pathRes, pathView) <- mreq (repositoryPathField True) (bfs "")