This commit is contained in:
jief 2020-04-14 10:27:57 +03:00
commit 5520ede381

View File

@ -1254,12 +1254,14 @@ VOID ScanLoader(VOID)
if (gSettings.LinuxScan) { if (gSettings.LinuxScan) {
// check for linux loaders // check for linux loaders
for (Index = 0; Index < LinuxEntryDataCount; ++Index) { for (Index = 0; Index < LinuxEntryDataCount; ++Index) {
if (FileExists(Volume->RootDir, LinuxEntryData[Index].Path)) {
XImage ImageX; XImage ImageX;
XStringW IconXSW = XStringW().takeValueFrom(LinuxEntryData[Index].Icon); XStringW IconXSW = XStringW().takeValueFrom(LinuxEntryData[Index].Icon);
ImageX.LoadXImage(ThemeX.ThemeDir, (L"os_"_XSW + IconXSW.SubString(0, IconXSW.IdxOf(','))).wc_str()); ImageX.LoadXImage(ThemeX.ThemeDir, (L"os_"_XSW + IconXSW.SubString(0, IconXSW.IdxOf(','))).wc_str());
AddLoaderEntry(LinuxEntryData[Index].Path, ""_XS, XStringW().takeValueFrom(LinuxEntryData[Index].Title), Volume, AddLoaderEntry(LinuxEntryData[Index].Path, ""_XS, XStringW().takeValueFrom(LinuxEntryData[Index].Title), Volume,
(ImageX.isEmpty() ? NULL : &ImageX), OSTYPE_LIN, OSFLAG_NODEFAULTARGS); (ImageX.isEmpty() ? NULL : &ImageX), OSTYPE_LIN, OSFLAG_NODEFAULTARGS);
} }
}
// check for linux kernels // check for linux kernels
PartGUID = FindGPTPartitionGuidInDevicePath(Volume->DevicePath); PartGUID = FindGPTPartitionGuidInDevicePath(Volume->DevicePath);
if ((PartGUID != NULL) && (Volume->RootDir != NULL)) { if ((PartGUID != NULL) && (Volume->RootDir != NULL)) {