From 28f723e21e848bccb48dccdc4de31fb97f01d780 Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Sat, 28 Jul 2001 07:05:56 +0000 Subject: [PATCH] Fixed the 'REACTOS' volume label bug. svn path=/trunk/; revision=2109 --- reactos/drivers/fs/vfat/direntry.c | 8 +++++++- reactos/drivers/fs/vfat/fcb.c | 5 +++-- reactos/drivers/fs/vfat/vfat.h | 3 ++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/reactos/drivers/fs/vfat/direntry.c b/reactos/drivers/fs/vfat/direntry.c index e0d07f6cbd9..b5012244d0d 100644 --- a/reactos/drivers/fs/vfat/direntry.c +++ b/reactos/drivers/fs/vfat/direntry.c @@ -1,4 +1,4 @@ -/* $Id: direntry.c,v 1.2 2001/07/13 10:31:14 ekohl Exp $ +/* $Id: direntry.c,v 1.3 2001/07/28 07:05:56 hbirr Exp $ * * * FILE: DirEntry.c @@ -64,6 +64,12 @@ vfatIsDirEntryLongName (FATDirEntry * pFatDirEntry) return pFatDirEntry->Attrib == 0x0f; } +BOOL +vfatIsDirEntryVolume (FATDirEntry * pFatDirEntry) +{ + return pFatDirEntry->Attrib == 0x28; +} + void vfatGetDirEntryName (PFAT_DIR_ENTRY dirEntry, PWSTR entryName) { diff --git a/reactos/drivers/fs/vfat/fcb.c b/reactos/drivers/fs/vfat/fcb.c index ae9d041f72b..b1c43cb7743 100644 --- a/reactos/drivers/fs/vfat/fcb.c +++ b/reactos/drivers/fs/vfat/fcb.c @@ -1,4 +1,4 @@ -/* $Id: fcb.c,v 1.7 2001/07/25 17:39:34 hbirr Exp $ +/* $Id: fcb.c,v 1.8 2001/07/28 07:05:56 hbirr Exp $ * * * FILE: fcb.c @@ -466,7 +466,8 @@ vfatDirFindFile (PDEVICE_EXTENSION pDeviceExt, directoryIndex, currentLongName); - if (!vfatIsDirEntryDeleted (¤tDirEntry)) + if (!vfatIsDirEntryDeleted (¤tDirEntry) + && !vfatIsDirEntryVolume(¤tDirEntry)) { if (currentLongName [0] != L'\0' && wstrcmpjoki (currentLongName, pFileToFind)) { diff --git a/reactos/drivers/fs/vfat/vfat.h b/reactos/drivers/fs/vfat/vfat.h index 7c86ff1ddaa..d1b0a863c37 100644 --- a/reactos/drivers/fs/vfat/vfat.h +++ b/reactos/drivers/fs/vfat/vfat.h @@ -1,4 +1,4 @@ -/* $Id: vfat.h,v 1.33 2001/07/20 08:00:21 ekohl Exp $ */ +/* $Id: vfat.h,v 1.34 2001/07/28 07:05:56 hbirr Exp $ */ #include @@ -334,6 +334,7 @@ VfatOpenFile(PDEVICE_EXTENSION DeviceExt, ULONG vfatDirEntryGetFirstCluster (PDEVICE_EXTENSION pDeviceExt, PFAT_DIR_ENTRY pDirEntry); BOOL vfatIsDirEntryDeleted (FATDirEntry * pFatDirEntry); +BOOL vfatIsDirEntryVolume (FATDirEntry * pFatDirEntry); void vfatGetDirEntryName (PFAT_DIR_ENTRY pDirEntry, PWSTR pEntryName); NTSTATUS vfatGetNextDirEntry (PDEVICE_EXTENSION pDeviceExt, PVFATFCB pDirectoryFCB,