go go gadget hlint

This commit is contained in:
Joey Hess 2011-09-20 23:24:48 -04:00
parent 9d26192350
commit 9f6b7935dd
21 changed files with 35 additions and 37 deletions

View file

@ -19,7 +19,7 @@ import Control.Applicative
parentDir :: FilePath -> FilePath
parentDir dir =
if not $ null dirs
then slash ++ join s (take (length dirs - 1) dirs)
then slash ++ join s (init dirs)
else ""
where
dirs = filter (not . null) $ split s dir