diff options
author | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-02-02 16:55:30 +0000 |
---|---|---|
committer | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-02-02 16:55:30 +0000 |
commit | 74fa83fda6be6277044619276d0f1391e72e54a2 (patch) | |
tree | 2201a6eb748778eb6417d52772f4499199c01361 /ShellPkg/Application | |
parent | 66c44008ba58f74dd88a2c137449d4335c784d40 (diff) | |
download | edk2-platforms-74fa83fda6be6277044619276d0f1391e72e54a2.tar.xz |
ShellPkg: fix 'ls' handling of empty drives where there is not even an "." or ".." directory.
Signed-off-by: jcarsey
Reviewed-by: winddy_zhang@byosoft.com.cn
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12981 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Application')
-rw-r--r-- | ShellPkg/Application/Shell/ShellProtocol.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ShellPkg/Application/Shell/ShellProtocol.c b/ShellPkg/Application/Shell/ShellProtocol.c index 3371e58b11..17c517c088 100644 --- a/ShellPkg/Application/Shell/ShellProtocol.c +++ b/ShellPkg/Application/Shell/ShellProtocol.c @@ -1799,7 +1799,7 @@ CreateAndPopulateShellFileInfo( if (ShellFileListItem == NULL) {
return (NULL);
}
- if (Info != NULL) {
+ if (Info != NULL && Info->Size != 0) {
ShellFileListItem->Info = AllocateZeroPool((UINTN)Info->Size);
if (ShellFileListItem->Info == NULL) {
FreePool(ShellFileListItem);
|