mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-31 01:24:12 +02:00
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
This commit is contained in:
parent
ac0f89ba97
commit
9485089dd5
@ -1,6 +1,6 @@
|
|||||||
/**@file
|
/**@file
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008, Intel Corporation
|
Copyright (c) 2006 - 2009, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
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.
|
// 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] == '\\') {
|
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);
|
StrCat (NewFileName, NewFileInfo->FileName + 1);
|
||||||
} else {
|
} 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);
|
StrCat (NewFileName, NewFileInfo->FileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user