projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cabbe6e
)
[project @ 2004-07-30 22:17:44 by krasimir]
author
krasimir
<unknown>
Fri, 30 Jul 2004 22:17:44 +0000
(22:17 +0000)
committer
krasimir
<unknown>
Fri, 30 Jul 2004 22:17:44 +0000
(22:17 +0000)
fix
System/Directory.hs
patch
|
blob
|
history
diff --git
a/System/Directory.hs
b/System/Directory.hs
index
39ca47f
..
2a1fa3c
100644
(file)
--- 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 ()
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 ->
(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
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
copyContents hFrom hTo buffer = do
count <- hGetBuf hFrom buffer bufferSize