Improve Windows path prefix parsing

This commit is contained in:
dylni
2022-03-19 10:30:34 -04:00
parent 2c28b0eaf9
commit e87082293e
6 changed files with 124 additions and 37 deletions

View File

@@ -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 {