webapp: Repo switcher filters out repos that do not exist any more (or are on a drive that's not mounted).

This commit is contained in:
Joey Hess 2013-01-09 18:59:45 -04:00
parent c224134413
commit bc6a59e3c6
3 changed files with 7 additions and 2 deletions

View file

@ -33,8 +33,9 @@ listOtherRepos = do
pwd <- getCurrentDirectory
dirs <- filter (\d -> not $ d `dirContains` pwd) . nub
<$> ifM (doesFileExist f) ( lines <$> readFile f, return [])
names <- mapM relHome dirs
return $ sort $ zip names dirs
gooddirs <- filterM doesDirectoryExist dirs
names <- mapM relHome gooddirs
return $ sort $ zip names gooddirs
{- Starts up the assistant in the repository, and waits for it to create
- a gitAnnexUrlFile. Waits for the assistant to be up and listening for