summaryrefslogtreecommitdiff
path: root/Locations.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Locations.hs')
-rw-r--r--Locations.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Locations.hs b/Locations.hs
index 85fcb9888..73a2473b5 100644
--- a/Locations.hs
+++ b/Locations.hs
@@ -90,7 +90,8 @@ gitAnnexLocation key r
return $ inrepo ".git" </> annexLocation key hashDirMixed
where
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. -}
gitAnnexDir :: Git.Repo -> FilePath