nub the autostart file

It's possible for the file to get duplicate lines in it, and if so, we want
to ignore the dups.
This commit is contained in:
Joey Hess 2012-10-14 15:19:34 -04:00
parent 04a69b22b1
commit 51ef707a59
3 changed files with 3 additions and 3 deletions

View file

@ -153,6 +153,6 @@ otherReposWidget = do
listOtherRepos :: IO [(String, String)]
listOtherRepos = do
f <- autoStartFile
dirs <- ifM (doesFileExist f) ( lines <$> readFile f, return [])
dirs <- nub <$> ifM (doesFileExist f) ( lines <$> readFile f, return [])
names <- mapM relHome dirs
return $ sort $ zip names dirs