From: qmuntal Date: Thu, 30 Mar 2023 08:28:32 +0000 (+0200) Subject: cmd/gofmt: set backup file permissions on Windows X-Git-Tag: go1.21rc1~1068 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=012297a862627e236e4d693476a97ffbbf5e27dc;p=gostls13.git cmd/gofmt: set backup file permissions on Windows File.Chmod is supported on Windows since CL 250077, there is no need to skip the call anymore. Updates #18026 Change-Id: Ie03cf016e651b93241f73067614fc4cb341504ef Reviewed-on: https://go-review.googlesource.com/c/go/+/480416 Run-TryBot: Quim Muntal TryBot-Result: Gopher Robot Reviewed-by: Bryan Mills Reviewed-by: Matthew Dempsky --- diff --git a/src/cmd/gofmt/gofmt.go b/src/cmd/gofmt/gofmt.go index e464d64c98..00c8cbdb93 100644 --- a/src/cmd/gofmt/gofmt.go +++ b/src/cmd/gofmt/gofmt.go @@ -470,8 +470,6 @@ func fileWeight(path string, info fs.FileInfo) int64 { return info.Size() } -const chmodSupported = runtime.GOOS != "windows" - // backupFile writes data to a new file named filename with permissions perm, // with