If the filename was absolute, writeFileAtomically
used the wrong filename for ioutil.TempFile leading
to non-existent directories and the TempFile would
fail.
R=r, r2
CC=golang-dev
https://golang.org/cl/
4224043
// atomically renames that file to the file named by filename.
//
func writeFileAtomically(filename string, data []byte) os.Error {
- f, err := ioutil.TempFile(cwd, filename)
+ f, err := ioutil.TempFile(pathutil.Split(filename))
if err != nil {
return err
}