Skip to content

Commit 0a7ade7

Browse files
committed
try fix writeFileAtomic with replaceFile
1 parent 54f0e09 commit 0a7ade7

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

Cabal-syntax/src/Distribution/Utils/Generic.hs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,7 @@ writeFileAtomic targetPath content = do
191191
( \(tmpPath, handle) -> do
192192
LBS.hPut handle content
193193
hClose handle
194-
Exception.catch
195-
(renameFile tmpPath targetPath)
196-
( \(_ :: Exception.SomeException) -> do
197-
copyFile tmpPath targetPath
198-
removeFile tmpPath
199-
)
194+
replaceFile tmpPath targetPath
200195
)
201196

202197
-- ------------------------------------------------------------

cabal.project

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,13 @@ package cabal-install
1212

1313
package Cabal
1414
flags: +git-rev
15+
16+
source-repository-package
17+
type: git
18+
location: https://github.com/zlonast/win32.git
19+
tag: 1805af5af1db5131b23b14edf0e2ba8c16e6710f
20+
21+
source-repository-package
22+
type: git
23+
location: https://github.com/zlonast/directory.git
24+
tag: e67c28da0f06d82d1f19dfcc2e0fb51e45a8399b

0 commit comments

Comments
 (0)