Correct error in egSaveFile causing for example folder instead of screenshot

This commit is contained in:
asava 2020-05-12 16:21:15 +03:00
parent ffec5b89c1
commit 9571af3d83

View File

@ -159,6 +159,7 @@ EFI_STATUS egSaveFile(IN EFI_FILE_HANDLE BaseDir OPTIONAL, IN CONST CHAR16 *File
}
dirNameLen = p - FileName;
StrnCpy(DirName, FileName, dirNameLen);
DirName[dirNameLen] = L'\0';
Status = BaseDir->Open(BaseDir, &FileHandle, DirName,
EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE, EFI_FILE_DIRECTORY);