Skip to content

Commit a14e25c

Browse files
committed
windows: document that we rely on an undocumented property of GetUserProfileDirectoryW
1 parent 5f292ee commit a14e25c

File tree

1 file changed

+2
-0
lines changed
  • library/std/src/sys/pal/windows

1 file changed

+2
-0
lines changed

library/std/src/sys/pal/windows/os.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@ fn home_dir_crt() -> Option<PathBuf> {
202202
|buf, mut sz| {
203203
// GetUserProfileDirectoryW does not quite use the usual protocol for
204204
// negotiating the buffer size, so we have to translate.
205+
// FIXME(#141254): We rely on the *undocumented* property that this function will
206+
// always set the size, not just on failure.
205207
match c::GetUserProfileDirectoryW(
206208
ptr::without_provenance_mut(CURRENT_PROCESS_TOKEN),
207209
buf,

0 commit comments

Comments
 (0)