From c9696a1c97146516b566a13efd56489089cc3df2 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Tue, 9 Oct 2012 09:43:08 -0400 Subject: [PATCH] Don't lose the last file in top-level directories The filesystem callback was failing to account for the additional menu item to return to the filesystem list, and so the last file entry in the root directory would be missing from the list. --- MokManager.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/MokManager.c b/MokManager.c index 88785e6..416cd97 100644 --- a/MokManager.c +++ b/MokManager.c @@ -857,7 +857,6 @@ static UINTN filesystem_callback (void *data, void *data2) { UINTN dircount = 0, i = 0; struct menu_item *dircontent; EFI_FILE *root = data; - EFI_FILE *parent = data2; uefi_call_wrapper(root->SetPosition, 2, root, 0); @@ -887,8 +886,7 @@ static UINTN filesystem_callback (void *data, void *data2) { buffersize = 0; } - if (parent) - dircount++; + dircount++; dircontent = AllocatePool(sizeof(struct menu_item) * dircount);