mirror of
https://github.com/acidanthera/audk.git
synced 2025-09-24 10:17:45 +02:00
FatPkg: Corrects FatDelete exit logic if PcdFatReadOnlyMode is set
The FatDelete routine closes the file even it write protected Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
This commit is contained in:
parent
18722f129f
commit
7052c3badf
@ -31,10 +31,6 @@ FatDelete (
|
||||
EFI_STATUS Status;
|
||||
UINTN Round;
|
||||
|
||||
if (FeaturePcdGet (PcdFatReadOnlyMode)) {
|
||||
return EFI_WRITE_PROTECTED;
|
||||
}
|
||||
|
||||
IFile = IFILE_FROM_FHAND (FHand);
|
||||
OFile = IFile->OFile;
|
||||
|
||||
@ -48,7 +44,7 @@ FatDelete (
|
||||
//
|
||||
// If the file is read-only, then don't delete it
|
||||
//
|
||||
if (IFile->ReadOnly) {
|
||||
if (IFile->ReadOnly || FeaturePcdGet (PcdFatReadOnlyMode)) {
|
||||
Status = EFI_WRITE_PROTECTED;
|
||||
goto Done;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user