finished this stage of the RawFilePath conversion

Finally compiles again, and test suite passes.

This commit was sponsored by Brock Spratlen on Patreon.
This commit is contained in:
Joey Hess 2020-11-04 14:20:37 -04:00
parent 4bcb4030a5
commit 5a1e73617d
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
36 changed files with 188 additions and 147 deletions

View file

@ -12,9 +12,10 @@ module Assistant.WebApp.OtherRepos where
import Assistant.Common
import Assistant.WebApp.Types
import Assistant.WebApp.Page
import Config.Files
import Config.Files.AutoStart
import Utility.Yesod
import Assistant.Restart
import qualified Utility.RawFilePath as R
getRepositorySwitcherR :: Handler Html
getRepositorySwitcherR = page "Switch repository" Nothing $ do
@ -24,9 +25,9 @@ getRepositorySwitcherR = page "Switch repository" Nothing $ do
listOtherRepos :: IO [(String, String)]
listOtherRepos = do
dirs <- readAutoStartFile
pwd <- getCurrentDirectory
pwd <- R.getCurrentDirectory
gooddirs <- filterM isrepo $
filter (\d -> not $ d `dirContains` pwd) dirs
filter (\d -> not $ toRawFilePath d `dirContains` pwd) dirs
names <- mapM relHome gooddirs
return $ sort $ zip names gooddirs
where