diff options
| author | dylni <46035563+dylni@users.noreply.github.com> | 2022-03-19 10:30:34 -0400 |
|---|---|---|
| committer | dylni <46035563+dylni@users.noreply.github.com> | 2022-04-17 01:23:46 -0400 |
| commit | e87082293e11a2f9c6d38bcd9896e8742e110ef8 (patch) | |
| tree | f0c2a82bf1bffaabc8b3798208b1417669f1800a /library/std/src/sys/windows/mod.rs | |
| parent | 2c28b0eaf9843ec0f493fca2dba506fe4d9174fb (diff) | |
| download | rust-e87082293e11a2f9c6d38bcd9896e8742e110ef8.tar.gz rust-e87082293e11a2f9c6d38bcd9896e8742e110ef8.zip | |
Improve Windows path prefix parsing
Diffstat (limited to 'library/std/src/sys/windows/mod.rs')
| -rw-r--r-- | library/std/src/sys/windows/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/library/std/src/sys/windows/mod.rs b/library/std/src/sys/windows/mod.rs index 31c7208bbf1..2c832aa75fd 100644 --- a/library/std/src/sys/windows/mod.rs +++ b/library/std/src/sys/windows/mod.rs @@ -190,6 +190,10 @@ where { // Start off with a stack buf but then spill over to the heap if we end up // needing more space. + // + // This initial size also works around `GetFullPathNameW` returning + // incorrect size hints for some short paths: + // https://github.com/dylni/normpath/issues/5 let mut stack_buf = [0u16; 512]; let mut heap_buf = Vec::new(); unsafe { |
