diff options
author | gikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-06-03 03:11:36 +0000 |
---|---|---|
committer | gikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-06-03 03:11:36 +0000 |
commit | 6a729dcaf453e5ddd790c73992c254c0d7a33b83 (patch) | |
tree | 047d1dc3887d663c2337e2b19d5bf9e99b872331 /Nt32Pkg/WinNtSimpleFileSystemDxe | |
parent | 20621542f64449c18a4cbafb34c4f0b6e06856be (diff) | |
download | edk2-platforms-6a729dcaf453e5ddd790c73992c254c0d7a33b83.tar.xz |
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
Diffstat (limited to 'Nt32Pkg/WinNtSimpleFileSystemDxe')
-rw-r--r-- | Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.c b/Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.c index c267cf2a1a..7da3eef9ce 100644 --- a/Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.c +++ b/Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.c @@ -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)) {
|