avoid partial function
This commit is contained in:
parent
fbc3d32f7d
commit
0f9859ae51
1 changed files with 2 additions and 1 deletions
|
@ -90,7 +90,8 @@ gitAnnexLocation key r
|
||||||
return $ inrepo ".git" </> annexLocation key hashDirMixed
|
return $ inrepo ".git" </> annexLocation key hashDirMixed
|
||||||
where
|
where
|
||||||
inrepo d = Git.workTree r </> d
|
inrepo d = Git.workTree r </> d
|
||||||
check locs = fromMaybe (head locs) <$> firstM doesFileExist locs
|
check locs@(l:_) = fromMaybe l <$> firstM doesFileExist locs
|
||||||
|
check [] = error "internal"
|
||||||
|
|
||||||
{- The annex directory of a repository. -}
|
{- The annex directory of a repository. -}
|
||||||
gitAnnexDir :: Git.Repo -> FilePath
|
gitAnnexDir :: Git.Repo -> FilePath
|
||||||
|
|
Loading…
Reference in a new issue