From 64ca9e3c3446ca8cee1ce62d282e2a40109af1a5 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sun, 11 May 2003 19:41:22 +0000 Subject: [PATCH] Fixed a bug which skipped the first letter of a relative object path name. svn path=/trunk/; revision=4676 --- reactos/ntoskrnl/ob/object.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/ob/object.c b/reactos/ntoskrnl/ob/object.c index 30334a9a6f9..9c43d77a2f2 100644 --- a/reactos/ntoskrnl/ob/object.c +++ b/reactos/ntoskrnl/ob/object.c @@ -1,4 +1,4 @@ -/* $Id: object.c,v 1.58 2003/02/25 16:49:08 ekohl Exp $ +/* $Id: object.c,v 1.59 2003/05/11 19:41:22 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -242,6 +242,7 @@ ObCreateObject(OUT PHANDLE Handle, POBJECT_HEADER ParentHeader = NULL; NTSTATUS Status; BOOLEAN ObjectAttached = FALSE; + PWCHAR NamePtr; assert_irql(APC_LEVEL); @@ -288,9 +289,14 @@ ObCreateObject(OUT PHANDLE Handle, ParentHeader->ObjectType == ObDirectoryType && RemainingPath.Buffer != NULL) { + NamePtr = RemainingPath.Buffer; + if (*NamePtr == L'\\') + NamePtr++; + ObpAddEntryDirectory(Parent, Header, - RemainingPath.Buffer+1); + NamePtr); + ObjectAttached = TRUE; }