ShellPkg: Remove redundant quotes in file path string for Shell command parameters.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16122 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Qiu Shumin
2014-09-17 07:58:31 +00:00
committed by shenshushi
parent 3a3395f06b
commit 0960ba17e5
7 changed files with 192 additions and 30 deletions

View File

@ -38,6 +38,7 @@ ShellCommandRunCd (
SHELL_FILE_HANDLE Handle;
CONST CHAR16 *Param1;
CHAR16 *Param1Copy;
CHAR16* Walker;
ProblemParam = NULL;
ShellStatus = SHELL_SUCCESS;
@ -96,6 +97,12 @@ ShellCommandRunCd (
}
} else {
Param1Copy = CatSPrint(NULL, L"%s", Param1, NULL);
for (Walker = Param1Copy; Walker != NULL && *Walker != CHAR_NULL ; Walker++) {
if (*Walker == L'\"') {
CopyMem(Walker, Walker+1, StrSize(Walker) - sizeof(Walker[0]));
}
}
if (Param1Copy != NULL) {
Param1Copy = PathCleanUpDirectories(Param1Copy);
}