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
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user