From: krasimir Date: Fri, 30 Jul 2004 22:17:44 +0000 (+0000) Subject: [project @ 2004-07-30 22:17:44 by krasimir] X-Git-Tag: nhc98-1-18-release~285 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=3f2b8c7b91b7088eaa2a0c8a1b754ed14dad350f;p=ghc-base.git [project @ 2004-07-30 22:17:44 by krasimir] fix --- diff --git a/System/Directory.hs b/System/Directory.hs index 39ca47f..2a1fa3c 100644 --- a/System/Directory.hs +++ b/System/Directory.hs @@ -435,7 +435,7 @@ If the /new/ file already exists, it is atomically replaced by the /old/ file. Neither path may refer to an existing directory. -} copyFile :: FilePath -> FilePath -> IO () -copyFile fromFPath toFPath = handle (changeFunName) $ +copyFile fromFPath toFPath = (bracket (openBinaryFile fromFPath ReadMode) hClose $ \hFrom -> bracket (openBinaryFile toFPath WriteMode) hClose $ \hTo -> allocaBytes bufferSize $ \buffer -> @@ -444,7 +444,6 @@ copyFile fromFPath toFPath = handle (changeFunName) $ bufferSize = 1024 changeFunName (IOError h iot fun str mb_fp) = IOError h iot "copyFile" str mb_fp - changeFunName e = e copyContents hFrom hTo buffer = do count <- hGetBuf hFrom buffer bufferSize