<pre class="notranslate">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.</pre>
<p dir="auto">by <strong>awalterschulze</strong>:</p>
<pre class="notranslate">Before filing a bug, please check whether it has been fixed since the
latest release. Search the issue tracker and check that you're running the
latest version of Go:

Run "go version" and compare against
<a href="http://golang.org/doc/devel/release.html" rel="nofollow">http://golang.org/doc/devel/release.html</a>  If a newer version of Go exists,
install it and retry what you did to reproduce the problem.

Thanks.

What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. <a href="http://play.golang.org/p/d-6SskGBBg" rel="nofollow">http://play.golang.org/p/d-6SskGBBg</a>
2.
3.

What is the expected output?
equal

What do you see instead?
pointer to zero value has been decoded as a nil value

Which compiler are you using (5g, 6g, 8g, gccgo)?


Which operating system are you using?


Which version are you using?  (run 'go version')


Please provide any additional information below.</pre>