From d331899c12bac157d76780c6f3107b00514ca3d8 Mon Sep 17 00:00:00 2001 From: Alan Donovan Date: Wed, 30 Dec 2015 11:05:30 -0500 Subject: [PATCH] refactor/rename: add pid to name of temporary file for diff Change-Id: Icd543062b4e1fe8c998f95c0daff5364f08ce83c Reviewed-on: https://go-review.googlesource.com/18211 Reviewed-by: Ralph Corderoy Reviewed-by: Michael Matloob --- refactor/rename/rename.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/refactor/rename/rename.go b/refactor/rename/rename.go index e8eaa4127e..ef85071def 100644 --- a/refactor/rename/rename.go +++ b/refactor/rename/rename.go @@ -488,7 +488,7 @@ func reallyWriteFile(filename string, content []byte) error { } func diff(filename string, content []byte) error { - renamed := filename + ".renamed" + renamed := fmt.Sprintf("%s.%d.renamed", filename, os.Getpid()) if err := ioutil.WriteFile(renamed, content, 0644); err != nil { return err }