From 3f2b8c7b91b7088eaa2a0c8a1b754ed14dad350f Mon Sep 17 00:00:00 2001 From: krasimir Date: Fri, 30 Jul 2004 22:17:44 +0000 Subject: [PATCH] [project @ 2004-07-30 22:17:44 by krasimir] fix --- System/Directory.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 -- 1.7.10.4