From 9f6b7935ddb3d5dcbe0b4b784dc8acd7288ddba6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 20 Sep 2011 23:24:48 -0400 Subject: go go gadget hlint --- Utility/Path.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Utility/Path.hs') diff --git a/Utility/Path.hs b/Utility/Path.hs index fe474ee82..ce54fb369 100644 --- a/Utility/Path.hs +++ b/Utility/Path.hs @@ -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 -- cgit v1.2.3