From 74fa83fda6be6277044619276d0f1391e72e54a2 Mon Sep 17 00:00:00 2001 From: jcarsey Date: Thu, 2 Feb 2012 16:55:30 +0000 Subject: 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 --- ShellPkg/Application/Shell/ShellProtocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ShellPkg/Application/Shell') 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); -- cgit v1.2.3