diff options
Diffstat (limited to 'ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c')
-rw-r--r-- | ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c index c1e2887aa1..25bf8ca9e1 100644 --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c @@ -2,7 +2,7 @@ Main file for ls shell level 2 function.
(C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>
- Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>
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
@@ -669,6 +669,8 @@ ShellCommandRunLs ( ASSERT(FullPath == NULL);
StrnCatGrow(&SearchString, NULL, L"*", 0);
StrnCatGrow(&FullPath, NULL, CurDir, 0);
+ Size = FullPath != NULL? StrSize(FullPath) : 0;
+ StrnCatGrow(&FullPath, &Size, L"\\", 0);
} else {
if (StrStr(PathName, L":") == NULL && gEfiShellProtocol->GetCurDir(NULL) == NULL) {
//
@@ -687,6 +689,8 @@ ShellCommandRunLs ( ShellCommandLineFreeVarList (Package);
return SHELL_OUT_OF_RESOURCES;
}
+ Size = FullPath != NULL? StrSize(FullPath) : 0;
+ StrnCatGrow(&FullPath, &Size, L"\\", 0);
}
StrnCatGrow(&FullPath, &Size, PathName, 0);
if (FullPath == NULL) {
|