mirror of https://github.com/acidanthera/audk.git
ShellPkg: Fix rm CWD protection to be better at catching similarly named directories.
signed-off-by: jcarsey reviewed-by: geekboy15a git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12950 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
ecfd71af17
commit
a32980dd3c
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Main file for attrib shell level 2 function.
|
Main file for attrib shell level 2 function.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
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
|
||||||
|
@ -202,7 +202,10 @@ IsValidDeleteTarget(
|
||||||
Size = 0;
|
Size = 0;
|
||||||
Pattern = StrnCatGrow(&Pattern , NULL, TempLocation , 0);
|
Pattern = StrnCatGrow(&Pattern , NULL, TempLocation , 0);
|
||||||
SearchString = StrnCatGrow(&SearchString, &Size, Node->FullName, 0);
|
SearchString = StrnCatGrow(&SearchString, &Size, Node->FullName, 0);
|
||||||
SearchString = StrnCatGrow(&SearchString, &Size, L"*", 0);
|
if (!EFI_ERROR(ShellIsDirectory(SearchString))) {
|
||||||
|
SearchString = StrnCatGrow(&SearchString, &Size, L"\\", 0);
|
||||||
|
SearchString = StrnCatGrow(&SearchString, &Size, L"*", 0);
|
||||||
|
}
|
||||||
|
|
||||||
if (Pattern == NULL || SearchString == NULL) {
|
if (Pattern == NULL || SearchString == NULL) {
|
||||||
RetVal = FALSE;
|
RetVal = FALSE;
|
||||||
|
|
Loading…
Reference in New Issue