From 036a0ad651e978caac6ea715a9da2948504deb94 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Tue, 26 Sep 2017 13:49:09 +0000 Subject: [PATCH] [FASTFAT] Revert r75975 because of failures in the advpack files winetest. svn path=/trunk/; revision=75976 --- reactos/drivers/filesystems/fastfat/create.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/reactos/drivers/filesystems/fastfat/create.c b/reactos/drivers/filesystems/fastfat/create.c index 6ec553df3e1..248d99e7f7e 100644 --- a/reactos/drivers/filesystems/fastfat/create.c +++ b/reactos/drivers/filesystems/fastfat/create.c @@ -577,7 +577,7 @@ VfatCreateFile( else { PVFATFCB TargetFcb; - LONG idx; + LONG idx, FileNameLen; vfatAddToStat(DeviceExt, Fat.CreateHits, 1); @@ -615,6 +615,15 @@ VfatCreateFile( if (idx > 0 || PathNameU.Buffer[0] == L'\\') { + /* We don't want to include / in the name */ + FileNameLen = PathNameU.Length - ((idx + 1) * sizeof(WCHAR)); + + /* Update FO just to keep file name */ + /* Skip first slash */ + ++idx; + FileObject->FileName.Length = FileNameLen; + RtlMoveMemory(&PathNameU.Buffer[0], &PathNameU.Buffer[idx], FileObject->FileName.Length); +#if 0 /* Terminate the string at the last backslash */ PathNameU.Buffer[idx + 1] = UNICODE_NULL; PathNameU.Length = (idx + 1) * sizeof(WCHAR); @@ -623,6 +632,7 @@ VfatCreateFile( /* Update the file object as well */ FileObject->FileName.Length = PathNameU.Length; FileObject->FileName.MaximumLength = PathNameU.MaximumLength; +#endif } else {