Re: [PATCH] kernel32: Implement GetFinalPathNameByHandle
19 Mar
2015
19 Mar
'15
3:54 p.m.
Andrew Eikum <aeikum(a)codeweavers.com> wrote:
+ info->FileName[info->FileNameLength / sizeof(WCHAR)] = 0; + if (!RtlDosPathNameToNtPathName_U( info->FileName, &nt_name, NULL, NULL )) + { + SetLastError( ERROR_PATH_NOT_FOUND ); + return 0; + } + + name_wchars = nt_name.Length / sizeof(WCHAR); + if (name_wchars + 1 > len) + { + RtlFreeUnicodeString( &nt_name ); + return name_wchars + 1; + } + + memcpy( outstr, nt_name.Buffer, nt_name.Length ); + outstr[name_wchars] = 0;
Where did you get an idea that you should return an nt path from this API? There is no a single check in the tests for a returned file name, and this whole thing looks over complicated. -- Dmitry.
3924
Age (days ago)
3924
Last active (days ago)
0 comments
1 participants
participants (1)
-
Dmitry Timoshkov