about summary refs log tree commit diff
path: root/library/std/src/sys/pal/windows/os.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/sys/pal/windows/os.rs')
-rw-r--r--library/std/src/sys/pal/windows/os.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/sys/pal/windows/os.rs b/library/std/src/sys/pal/windows/os.rs
index 374c9845ea4..64d8b72aed2 100644
--- a/library/std/src/sys/pal/windows/os.rs
+++ b/library/std/src/sys/pal/windows/os.rs
@@ -326,6 +326,8 @@ fn home_dir_crt() -> Option<PathBuf> {
 
         super::fill_utf16_buf(
             |buf, mut sz| {
+                // GetUserProfileDirectoryW does not quite use the usual protocol for
+                // negotiating the buffer size, so we have to translate.
                 match c::GetUserProfileDirectoryW(
                     ptr::without_provenance_mut(CURRENT_PROCESS_TOKEN),
                     buf,