We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1ea34fb + c736c2a commit a05a129Copy full SHA for a05a129
library/std/src/sys/windows/os.rs
@@ -281,6 +281,10 @@ pub fn temp_dir() -> PathBuf {
281
#[cfg(not(target_vendor = "uwp"))]
282
fn home_dir_crt() -> Option<PathBuf> {
283
unsafe {
284
+ // The magic constant -4 can be used as the token passed to GetUserProfileDirectoryW below
285
+ // instead of us having to go through these multiple steps to get a token. However this is
286
+ // not implemented on Windows 7, only Windows 8 and up. When we drop support for Windows 7
287
+ // we can simplify this code. See #90144 for details.
288
use crate::sys::handle::Handle;
289
290
let me = c::GetCurrentProcess();
0 commit comments