summaryrefslogtreecommitdiff
path: root/Seek.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-10-07 13:03:05 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-10-07 13:03:05 -0400
commit894422e4234a463d34faf168b7b7cae68972a350 (patch)
tree08a2987bfb1a3522182b44ee814670407b095c61 /Seek.hs
parent2c056703aad7cce36e8bc9213b3f922c5823c901 (diff)
import: Skip .git directories.
Diffstat (limited to 'Seek.hs')
-rw-r--r--Seek.hs3
1 files changed, 2 insertions, 1 deletions
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)]
)