From 894422e4234a463d34faf168b7b7cae68972a350 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 7 Oct 2013 13:03:05 -0400 Subject: import: Skip .git directories. --- Seek.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Seek.hs') diff --git a/Seek.hs b/Seek.hs index 85b266d49..d140e09e8 100644 --- a/Seek.hs +++ b/Seek.hs @@ -60,7 +60,8 @@ withPathContents :: ((FilePath, FilePath) -> CommandStart) -> CommandSeek withPathContents a params = map a . concat <$> liftIO (mapM get params) where get p = ifM (isDirectory <$> getFileStatus p) - ( map (\f -> (f, makeRelative (parentDir p) f)) <$> dirContentsRecursive p + ( map (\f -> (f, makeRelative (parentDir p) f)) + <$> dirContentsRecursiveSkipping (".git" `isSuffixOf`) p , return [(p, takeFileName p)] ) -- cgit v1.2.3