Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
os: Inconsistent Rename behavior on windows #5620
What steps will reproduce the problem? 1. create file "a" and "b" 2. run `os.Rename("a", "b")` What is the expected output? file "b" should be atomically replaced with file "a" What do you see instead? rename a b: Cannot create a file when that file already exists. Which compiler are you using (5g, 6g, 8g, gccgo)? 6g Which operating system are you using? windows 8 64-bit Which version are you using? (run 'go version') go version go1.1rc3 windows/amd64 I think it should use MoveFileEx syscall with MOVEFILE_REPLACE_EXISTING flag set instead of plain MoveFile syscall.
This issue was closed.