Skip to content

Commit

Permalink
doc/go1.21: document that os.TempDir now uses GetTempPath2W
Browse files Browse the repository at this point in the history
Updates #56899

Change-Id: Ibde69cd55c81ac0bb757b28b28d69463778dd117
Reviewed-on: https://go-review.googlesource.com/c/go/+/500255
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Quim Muntal <quimmuntal@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
  • Loading branch information
qmuntal committed Jun 2, 2023
1 parent c9faf31 commit ae71a86
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions doc/go1.21.html
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,15 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
an error indicating that the file does not exist.
</p>

<p><!-- https://go.dev/issue/56899, CL 463219 -->
On Windows calling
<a href="/pkg/os/#TempDir"><code>TempDir</code></a> now uses
GetTempPath2W when available, instead of GetTempPathW. The
new behavior is a security hardening measure that prevents
temporary files created by processes running as SYSTEM to
be accessed by non-SYSTEM processes.
</p>

<p><!-- CL 493036 -->
On Windows the os package now supports working with files whose
names, stored as UTF-16, can't be represented as valid UTF-8.
Expand Down

0 comments on commit ae71a86

Please sign in to comment.