Keep "Bootx64" for debug log name if booted on /EFI/Boot/BootX64.efi

This commit is contained in:
jief666 2020-11-24 16:14:48 +03:00
parent 8a561576cd
commit c9cfc183d9

View File

@ -71,6 +71,8 @@ EFI_STATUS Self::_initialize()
m_CloverDirFullPath.insertAtPos('\\', 0);
}
m_efiFileName = m_CloverDirFullPath.basename();
// History : if this Clover was started as BootX64.efi, redirect to /EFI/CLOVER
if ( m_CloverDirFullPath.equalIC("\\EFI\\Boot\\BootX64.efi") ) {
m_CloverDirFullPath.takeValueFrom("\\EFI\\CLOVER\\CloverX64.efi");
@ -83,8 +85,6 @@ EFI_STATUS Self::_initialize()
if ( m_CloverDirFullPath.lastChar() == U'\\' ) panic("m_CloverDirFullPath.lastChar() == U'\\'");
//if ( m_CloverDirFullPath.endsWith('\\') ) panic("m_CloverDirFullPath.endsWith('\\')");
m_efiFileName = m_CloverDirFullPath.basename();
size_t i = m_CloverDirFullPath.rindexOf(U'\\', SIZE_T_MAX-1);
if ( i != SIZE_T_MAX && i > 0 ) m_CloverDirFullPath.deleteCharsAtPos(i, SIZE_T_MAX);