summaryrefslogtreecommitdiff
path: root/Assistant/Threads
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-08-02 07:47:50 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-08-02 07:50:13 -0400
commit9a038b4a9b62824646bf4e876ed9017a1128aa56 (patch)
tree1fb0f5ff59693b9190f5744a1b5806da67fc077b /Assistant/Threads
parent112ce4f49c95022d1afe83bd31f4af35a01f877c (diff)
better ~/ handling
Diffstat (limited to 'Assistant/Threads')
-rw-r--r--Assistant/Threads/WebApp.hs9
1 files changed, 3 insertions, 6 deletions
diff --git a/Assistant/Threads/WebApp.hs b/Assistant/Threads/WebApp.hs
index e8de408a1..7ea7314e0 100644
--- a/Assistant/Threads/WebApp.hs
+++ b/Assistant/Threads/WebApp.hs
@@ -64,12 +64,9 @@ webAppThread mst dstatus transferqueue postfirstrun onstartup = do
Just st -> go port webapp =<< runThreadState st (fromRepo gitAnnexHtmlShim)
where
getreldir Nothing = return Nothing
- getreldir (Just st) = do
- dir <- absPath =<< runThreadState st (fromRepo repoPath)
- home <- myHomeDir
- return $ Just $ if dirContains home dir
- then relPathDirToFile home dir
- else dir
+ getreldir (Just st) = Just <$>
+ (relHome =<< absPath
+ =<< runThreadState st (fromRepo repoPath))
go port webapp htmlshim = do
writeHtmlShim webapp port htmlshim
maybe noop (\a -> a (myUrl webapp port "/") htmlshim) onstartup