Not update the status until parse the file info success.

Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15054 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Eric Dong 2014-01-07 07:34:20 +00:00 committed by ydong10
parent 44c8400a7d
commit eff077992a
2 changed files with 4 additions and 11 deletions

View File

@ -1,7 +1,7 @@
/** @file /** @file
File explorer related functions. File explorer related functions.
Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR> Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -140,9 +140,6 @@ UpdateFileExplorer (
NewFileContext = (BM_FILE_CONTEXT *) NewMenuEntry->VariableContext; NewFileContext = (BM_FILE_CONTEXT *) NewMenuEntry->VariableContext;
if (NewFileContext->IsDir ) { if (NewFileContext->IsDir ) {
CallbackData->FeDisplayContext = FileExplorerDisplayDirectory;
RemoveEntryList (&NewMenuEntry->Link);
BOpt_FreeMenu (&DirectoryMenu); BOpt_FreeMenu (&DirectoryMenu);
Status = BOpt_FindFiles (CallbackData, NewMenuEntry); Status = BOpt_FindFiles (CallbackData, NewMenuEntry);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
@ -150,10 +147,10 @@ UpdateFileExplorer (
goto exit; goto exit;
} }
CreateMenuStringToken (CallbackData, CallbackData->FeHiiHandle, &DirectoryMenu); CreateMenuStringToken (CallbackData, CallbackData->FeHiiHandle, &DirectoryMenu);
BOpt_DestroyMenuEntry (NewMenuEntry);
UpdateFileExplorePage (CallbackData, &DirectoryMenu); UpdateFileExplorePage (CallbackData, &DirectoryMenu);
CallbackData->FeDisplayContext = FileExplorerDisplayDirectory;
} else { } else {
switch (CallbackData->FeCurrentState) { switch (CallbackData->FeCurrentState) {
case FileExplorerStateBootFromFile: case FileExplorerStateBootFromFile:

View File

@ -1,7 +1,7 @@
/** @file /** @file
Internal file explorer functions for SecureBoot configuration module. Internal file explorer functions for SecureBoot configuration module.
Copyright (c) 2012 - 2013, Intel Corporation. All rights reserved.<BR> Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -1133,9 +1133,6 @@ UpdateFileExplorer (
NewFileContext = (SECUREBOOT_FILE_CONTEXT *) NewMenuEntry->FileContext; NewFileContext = (SECUREBOOT_FILE_CONTEXT *) NewMenuEntry->FileContext;
if (NewFileContext->IsDir ) { if (NewFileContext->IsDir ) {
PrivateData->FeDisplayContext = FileExplorerDisplayDirectory;
RemoveEntryList (&NewMenuEntry->Link);
FreeMenu (&DirectoryMenu); FreeMenu (&DirectoryMenu);
Status = FindFiles (NewMenuEntry); Status = FindFiles (NewMenuEntry);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
@ -1143,10 +1140,9 @@ UpdateFileExplorer (
goto OnExit; goto OnExit;
} }
CreateMenuStringToken (PrivateData->HiiHandle, &DirectoryMenu); CreateMenuStringToken (PrivateData->HiiHandle, &DirectoryMenu);
DestroyMenuEntry (NewMenuEntry);
UpdateFileExplorePage (PrivateData->HiiHandle, &DirectoryMenu, PrivateData->FeCurrentState); UpdateFileExplorePage (PrivateData->HiiHandle, &DirectoryMenu, PrivateData->FeCurrentState);
PrivateData->FeDisplayContext = FileExplorerDisplayDirectory;
} else { } else {
if (PrivateData->FeCurrentState == FileExplorerStateEnrollPkFile) { if (PrivateData->FeCurrentState == FileExplorerStateEnrollPkFile) {
FormId = SECUREBOOT_ADD_PK_FILE_FORM_ID; FormId = SECUREBOOT_ADD_PK_FILE_FORM_ID;