diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-06-22 07:55:37 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-06-22 07:55:37 +0000 |
commit | 9485089dd5d8cd2e7abf6b0bb05414f423470764 (patch) | |
tree | 7c306a3e2146b15420a4c50c9dc2cd74fe72d02f | |
parent | ac0f89ba97e5ae1efffc10def6e6dc5da4a2c397 (diff) | |
download | edk2-platforms-9485089dd5d8cd2e7abf6b0bb05414f423470764.tar.xz |
fixed one bug causing "sct -u" failure when running at twice or more times.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8622 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.c | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.c b/Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.c index 1abb84185e..a5559bfc03 100644 --- a/Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.c +++ b/Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.c @@ -1,6 +1,6 @@ /**@file
-Copyright (c) 2006 - 2008, Intel Corporation
+Copyright (c) 2006 - 2009, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -2469,20 +2469,31 @@ Returns: //
// Make full pathname from new filename and rootpath.
//
- Size = StrSize (PrivateRoot->FilePath);
- Size += StrSize (L"\\");
- Size += StrSize (NewFileInfo->FileName);
- NewFileName = AllocatePool (Size);
- if (NewFileName == NULL) {
- Status = EFI_OUT_OF_RESOURCES;
- goto Done;
- }
-
- StrCpy (NewFileName, PrivateRoot->FilePath);
- StrCat (NewFileName, L"\\");
if (NewFileInfo->FileName[0] == '\\') {
+ Size = StrSize (PrivateRoot->FilePath);
+ Size += StrSize (L"\\");
+ Size += StrSize (NewFileInfo->FileName);
+ NewFileName = AllocatePool (Size);
+ if (NewFileName == NULL) {
+ Status = EFI_OUT_OF_RESOURCES;
+ goto Done;
+ }
+
+ StrCpy (NewFileName, PrivateRoot->FilePath);
+ StrCat (NewFileName, L"\\");
StrCat (NewFileName, NewFileInfo->FileName + 1);
} else {
+ Size = StrSize (PrivateFile->FilePath);
+ Size += StrSize (L"\\");
+ Size += StrSize (NewFileInfo->FileName);
+ NewFileName = AllocatePool (Size);
+ if (NewFileName == NULL) {
+ Status = EFI_OUT_OF_RESOURCES;
+ goto Done;
+ }
+
+ StrCpy (NewFileName, PrivateFile->FilePath);
+ StrCat (NewFileName, L"\\");
StrCat (NewFileName, NewFileInfo->FileName);
}
|