ntdll: Append the file_part for \\?\ long file names too [TRY 2]

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ntdll: Append the file_part for \\?\ long file names too [TRY 2]

James Hawkins
Hi,

Thanks to Eric Pouech for pointing out that file_part needs point into
ntpath->Buffer.  This patch makes that adjustment as well.

Changelog
* Set the file_part for \\?\ long file names too.

--
James Hawkins



path.diff (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ntdll: Append the file_part for \\?\ long file names too [TRY 2]

Alexandre Julliard
James Hawkins <[hidden email]> writes:

> diff -u -p -r1.35 path.c
> --- dlls/ntdll/path.c 11 Aug 2005 10:41:27 -0000 1.35
> +++ dlls/ntdll/path.c 15 Oct 2005 16:24:23 -0000
> @@ -421,6 +421,9 @@ BOOLEAN  WINAPI RtlDosPathNameToNtPathNa
>          if (!ntpath->Buffer) return FALSE;
>          memcpy( ntpath->Buffer, dos_path, ntpath->MaximumLength );
>          ntpath->Buffer[1] = '?';  /* change \\?\ to \??\ */
> +        RtlGetFullPathName_U(dos_path, sizeof(local), local, file_part);
> +        if (file_part && *file_part)
> +            *file_part = ntpath->Buffer + ntpath->Length / sizeof(WCHAR) - strlenW(*file_part);
>          return TRUE;

There's no reason to call RtlGetFullPathName, we already have a full
path name here.

--
Alexandre Julliard
[hidden email]