@@ -14,7 +14,7 @@ touchDirectories path = createDirectoryIfMissing True dir
14getRecursiveContents :: FilePath -> IO [FilePath]
14getRecursiveContents :: FilePath -> IO [FilePath]
15getRecursiveContents topdir = do
15getRecursiveContents topdir = do
16 names <- getDirectoryContents topdir
16 names <- getDirectoryContents topdir
17− let properNames = filter (`notElem` [".", ".."]) names
17+ let properNames = filter isProper names
18 paths <- forM properNames $ \name -> do
18 paths <- forM properNames $ \name -> do
19 let path = topdir </> name
19 let path = topdir </> name
20 isDirectory <- doesDirectoryExist path
20 isDirectory <- doesDirectoryExist path
@@ -22,3 +22,4 @@ getRecursiveContents topdir = do
22 then getRecursiveContents path
22 then getRecursiveContents path
23 else return [path]
23 else return [path]
24 return (concat paths)
24 return (concat paths)
25+ where isProper = not . (== '.') . head