Directory.renameFile broken under windows
|Reported by:||pstrand||Owned by:||nobody|
|Type of failure:||Test Case:|
|Related Tickets:||Differential Revisions:|
According to the library report, renameFile should succed even if the target file already exists. Under windows it fails with: Fail: already exists Action: renameFile Reason: File exists File: foo (ghc 6.0 and 6.0.1) The reason seems to be that it uses the rename library call directly, which indeed fails if the target exists: http://msdn.microsoft.com/library/default.asp? url=/library/en- us/vclib/html/_crt_rename.2c_._wrename.asp A solution might involve MoveFileEx(old, new, MOVEFILE_REPLACE_EXISTING) ?
Change History (1)
Note: See TracTickets for help on using tickets.