Skip to content

Commit

Permalink
guarding head.
Browse files Browse the repository at this point in the history
  • Loading branch information
kazu-yamamoto committed Mar 11, 2011
1 parent e0ec2e7 commit b9b8065
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion PkgDB.hs
Expand Up @@ -62,7 +62,9 @@ toPkgList prd db = filter prd $ allPackages db
userPkgs :: IO (PkgInfo -> Bool)
userPkgs = do
userDirPref <- getAppUserDataDirectory ""
return $ \pkgi -> userDirPref `isPrefixOf` (head $ libraryDirs pkgi)
return $ \pkgi -> case libraryDirs pkgi of
[] -> True -- FIXME
x:xs -> userDirPref `isPrefixOf` x

allPkgs :: IO (PkgInfo -> Bool)
allPkgs = return (const True)
Expand Down

0 comments on commit b9b8065

Please sign in to comment.