Fix <.><..> can not work correctly on NT32 platform.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8449 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
gikidy 2009-06-03 03:11:36 +00:00
parent 20621542f6
commit 6a729dcaf4
1 changed files with 4 additions and 3 deletions

View File

@ -902,10 +902,11 @@ OpenRoot:
}
//
// If file name does not equal to "." or "..",
// If file name does not equal to "." or ".." and not trailed with "\..",
// then we trim the leading/trailing blanks and trailing dots
//
if (StrCmp (FileName, L".") != 0 && StrCmp (FileName, L"..") != 0) {
if (StrCmp (FileName, L".") != 0 && StrCmp (FileName, L"..") != 0 &&
((StrLen (FileName) >= 3) ? (StrCmp (&FileName[StrLen (FileName) - 3], L"\\..") != 0) : TRUE)) {
//
// Trim leading blanks
//
@ -1255,7 +1256,7 @@ OpenRoot:
WinNtSimpleFileSystemSetInfo (&NewPrivateFile->EfiFile, &gEfiFileInfoGuid, InfoSize, Info);
}
Done: ;
Done:
FreePool (FileName);
if (EFI_ERROR (Status)) {