Opened 12 years ago

Closed 12 years ago

Last modified 46 years ago

#198 closed bug (Fixed)

Directory.renameFile broken under windows

Reported by: pstrand Owned by: nobody
Priority: normal Milestone:
Component: hslibs/posix Version: 6.0.1
Keywords: Cc:
Operating System: Architecture:
Type of failure: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


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:

A solution might involve MoveFileEx(old, new, 

Change History (1)

comment:1 Changed 12 years ago by sigbjorn

  • Status changed from assigned to closed
Logged In: YES 

Fixed a couple of months back, next version will include the 
change. cf.
Note: See TracTickets for help on using tickets.