logo       

[ ghc-Bugs-842445 ] Directory.renameFile broken under windows: msg#00038

lang.haskell.glasgow.bugs

Subject: [ ghc-Bugs-842445 ] Directory.renameFile broken under windows

Bugs item #842445, was opened at 2003-11-14 14:23
Message generated for change (Comment added) made by sigbjorn
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=842445&group_id=8032

Category: hslibs/posix
Group: 6.0.1
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Peter Strand (pstrand)
Assigned to: Nobody/Anonymous (nobody)
Summary: Directory.renameFile broken under windows

Initial Comment:

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) ?

----------------------------------------------------------------------

>Comment By: Sigbjorn Finne (sigbjorn)
Date: 2003-11-14 14:48

Message:
Logged In: YES
user_id=232905

Fixed a couple of months back, next version will include the
change. cf. http://haskell.org/pipermail/glasgow-haskell-
bugs/2003-July/003411.html

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=842445&group_id=8032


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise