webapp: New preferences page allows enabling/disabling debug logging at runtime, as well as configuring numcopies and diskreserve.

This commit is contained in:
Joey Hess 2013-03-03 17:07:27 -04:00
parent d7ad02f893
commit 08bdea7e52
13 changed files with 174 additions and 58 deletions

View file

@ -29,11 +29,10 @@ getRepositorySwitcherR = page "Switch repository" Nothing $ do
listOtherRepos :: IO [(String, String)]
listOtherRepos = do
f <- autoStartFile
dirs <- readAutoStartFile
pwd <- getCurrentDirectory
dirs <- filter (\d -> not $ d `dirContains` pwd) . nub
<$> ifM (doesFileExist f) ( lines <$> readFile f, return [])
gooddirs <- filterM doesDirectoryExist dirs
gooddirs <- filterM doesDirectoryExist $
filter (\d -> not $ d `dirContains` pwd) dirs
names <- mapM relHome gooddirs
return $ sort $ zip names gooddirs