From: simonmar Date: Tue, 16 Sep 2003 13:46:36 +0000 (+0000) Subject: [project @ 2003-09-16 13:46:36 by simonmar] X-Git-Tag: nhc98-1-18-release~507 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=5297505d37735903f022e825a80e92ca6ebf72c5;p=ghc-base.git [project @ 2003-09-16 13:46:36 by simonmar] Don't strip the trailing slash from the filename '/'. --- diff --git a/System/Directory.hs b/System/Directory.hs index 734ed94..9cb985c 100644 --- a/System/Directory.hs +++ b/System/Directory.hs @@ -636,7 +636,7 @@ isDirectory stat = do fileNameEndClean :: String -> String fileNameEndClean name = - if i >= 0 && (ec == '\\' || ec == '/') then + if i > 0 && (ec == '\\' || ec == '/') then fileNameEndClean (take i name) else name