[KERNEL32/RTL]: Fix build.

svn path=/trunk/; revision=52686
This commit is contained in:
Alex Ionescu 2011-07-15 01:44:03 +00:00
parent a595971d83
commit 048a29ec85
3 changed files with 14 additions and 15 deletions

View file

@ -259,7 +259,7 @@ InternalFindFirstFile (
PWSTR NtPathBuffer; PWSTR NtPathBuffer;
BOOLEAN RemovedLastChar = FALSE; BOOLEAN RemovedLastChar = FALSE;
BOOL bResult; BOOL bResult;
CURDIR DirInfo; RTL_RELATIVE_NAME_U DirInfo;
ULONG DeviceNameInfo; ULONG DeviceNameInfo;
HANDLE hDirectory = NULL; HANDLE hDirectory = NULL;
@ -292,20 +292,20 @@ InternalFindFirstFile (
} }
PathFileName.MaximumLength = PathFileName.Length; PathFileName.MaximumLength = PathFileName.Length;
if (DirInfo.DosPath.Length != 0 && DirInfo.DosPath.Buffer != PathFileName.Buffer) if (DirInfo.RelativeName.Length != 0 && DirInfo.RelativeName.Buffer != PathFileName.Buffer)
{ {
if (PathFileName.Buffer != NULL) if (PathFileName.Buffer != NULL)
{ {
/* This is a relative path to DirInfo.Handle, adjust NtPathU! */ /* This is a relative path to DirInfo.ContainingDirectory, adjust NtPathU! */
NtPathU.Length = NtPathU.MaximumLength = NtPathU.Length = NtPathU.MaximumLength =
(USHORT)((ULONG_PTR)PathFileName.Buffer - (ULONG_PTR)DirInfo.DosPath.Buffer); (USHORT)((ULONG_PTR)PathFileName.Buffer - (ULONG_PTR)DirInfo.RelativeName.Buffer);
NtPathU.Buffer = DirInfo.DosPath.Buffer; NtPathU.Buffer = DirInfo.RelativeName.Buffer;
} }
} }
else else
{ {
/* This is an absolute path, NtPathU receives the full path */ /* This is an absolute path, NtPathU receives the full path */
DirInfo.Handle = NULL; DirInfo.ContainingDirectory = NULL;
if (PathFileName.Buffer != NULL) if (PathFileName.Buffer != NULL)
{ {
NtPathU.Length = NtPathU.MaximumLength = NtPathU.Length = NtPathU.MaximumLength =
@ -332,12 +332,12 @@ InternalFindFirstFile (
TRACE("lpFileName: \"%ws\"\n", lpFileName); TRACE("lpFileName: \"%ws\"\n", lpFileName);
TRACE("NtPathU: \"%wZ\"\n", &NtPathU); TRACE("NtPathU: \"%wZ\"\n", &NtPathU);
TRACE("PathFileName: \"%wZ\"\n", &PathFileName); TRACE("PathFileName: \"%wZ\"\n", &PathFileName);
TRACE("RelativeTo: 0x%p\n", DirInfo.Handle); TRACE("RelativeTo: 0x%p\n", DirInfo.ContainingDirectory);
InitializeObjectAttributes (&ObjectAttributes, InitializeObjectAttributes (&ObjectAttributes,
&NtPathU, &NtPathU,
OBJ_CASE_INSENSITIVE, OBJ_CASE_INSENSITIVE,
DirInfo.Handle, DirInfo.ContainingDirectory,
NULL); NULL);
Status = NtOpenFile (&hDirectory, Status = NtOpenFile (&hDirectory,

View file

@ -424,7 +424,7 @@ BasepMapFile(IN LPCWSTR lpApplicationName,
OUT PHANDLE hSection, OUT PHANDLE hSection,
IN PUNICODE_STRING ApplicationName) IN PUNICODE_STRING ApplicationName)
{ {
CURDIR RelativeName; RTL_RELATIVE_NAME_U RelativeName;
OBJECT_ATTRIBUTES ObjectAttributes; OBJECT_ATTRIBUTES ObjectAttributes;
NTSTATUS Status; NTSTATUS Status;
HANDLE hFile = NULL; HANDLE hFile = NULL;
@ -433,7 +433,7 @@ BasepMapFile(IN LPCWSTR lpApplicationName,
DPRINT("BasepMapFile\n"); DPRINT("BasepMapFile\n");
/* Zero out the Relative Directory */ /* Zero out the Relative Directory */
RelativeName.Handle = NULL; RelativeName.ContainingDirectory = NULL;
/* Find the application name */ /* Find the application name */
if (!RtlDosPathNameToNtPathName_U(lpApplicationName, if (!RtlDosPathNameToNtPathName_U(lpApplicationName,
@ -445,19 +445,19 @@ BasepMapFile(IN LPCWSTR lpApplicationName,
} }
DPRINT("ApplicationName %wZ\n", ApplicationName); DPRINT("ApplicationName %wZ\n", ApplicationName);
DPRINT("RelativeName %wZ\n", &RelativeName.DosPath); DPRINT("RelativeName %wZ\n", &RelativeName.RelativeName);
/* Did we get a relative name? */ /* Did we get a relative name? */
if (RelativeName.DosPath.Length) if (RelativeName.RelativeName.Length)
{ {
ApplicationName = &RelativeName.DosPath; ApplicationName = &RelativeName.RelativeName;
} }
/* Initialize the Object Attributes */ /* Initialize the Object Attributes */
InitializeObjectAttributes(&ObjectAttributes, InitializeObjectAttributes(&ObjectAttributes,
ApplicationName, ApplicationName,
OBJ_CASE_INSENSITIVE, OBJ_CASE_INSENSITIVE,
RelativeName.Handle, RelativeName.ContainingDirectory,
NULL); NULL);
/* Try to open the executable */ /* Try to open the executable */

View file

@ -1014,7 +1014,6 @@ RtlDoesFileExists_UStr(IN PUNICODE_STRING FileName)
* @implemented * @implemented
*/ */
BOOLEAN BOOLEAN
BOOLEAN
NTAPI NTAPI
RtlDoesFileExists_UEx(IN PCWSTR FileName, RtlDoesFileExists_UEx(IN PCWSTR FileName,
IN BOOLEAN SucceedIfBusy) IN BOOLEAN SucceedIfBusy)