X-Git-Url: http://git.megacz.com/?p=haskell-directory.git;a=blobdiff_plain;f=System%2FDirectory.hs;h=c3698a2822357e4e886696b93984fbdbf1902b94;hp=e7affb68f03a1a7f85c8ce182f469a89f0e6432f;hb=fe5420ba0484d7a0937ec3a1153bd9b41967a803;hpb=ce0ccf7e2f726cfcf3fb4648408b142265c41460 diff --git a/System/Directory.hs b/System/Directory.hs index e7affb6..c3698a2 100644 --- a/System/Directory.hs +++ b/System/Directory.hs @@ -553,7 +553,7 @@ copyFile fromFPath toFPath = bracketOnError openTmp cleanTmp $ \(tmpFPath, hTmp) -> do allocaBytes bufferSize $ copyContents hFrom hTmp hClose hTmp - try (copyPermissions fromFPath toFPath) + try (copyPermissions fromFPath tmpFPath) renameFile tmpFPath toFPath openTmp = openBinaryTempFile (takeDirectory toFPath) ".copyFile.tmp" cleanTmp (tmpFPath, hTmp) = do try $ hClose hTmp