If the path length changes (file move?) between the GetFinalPathNameByHandleW calls we are going to be in trouble. I feel like I should just copy the fill_utf16_buf code in rust.
I think 22bdbbf2546f47e7a12d1874284900a46f66ac36 should be enough to at least make this method safe by adding the len2 >= len check. Now we fail when the path length increases between the two calls.
If the path length changes (file move?) between the GetFinalPathNameByHandleW calls we are going to be in trouble. I feel like I should just copy the fill_utf16_buf code in rust.