]> code.delx.au - refind/commitdiff
Fixed bug that could cause rEFInd to fail to detect boot loaders in the root
authorsrs5694 <srs5694@users.sourceforge.net>
Thu, 15 May 2014 23:42:50 +0000 (19:42 -0400)
committersrs5694 <srs5694@users.sourceforge.net>
Thu, 15 May 2014 23:42:50 +0000 (19:42 -0400)
directory of a partition.

NEWS.txt
refind/main.c

index 2bf51dc1d7f0e8c4a7e181084e82da26f73b778e..d9d52daad9e328bc98768cd660e3a896c61ce92f 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,6 +1,9 @@
 0.8.1 (5/??/2014):
 ------------------
 
+- Fixed bug that could cause rEFInd to fail to detect boot loaders stored
+  on the root directory of a partition.
+
 - Added two new bitmap fonts to those distributed with rEFInd: Ubuntu Mono
   and Nimbus Mono. Both come in 12-, 14-, 16-, and 24-point sizes.
 
index 51288d2f47beb4106dcdf0915d843cbbd6987935..5ef09c5bbe20c4fa4935b2e303c41fdef9b021a1 100644 (file)
@@ -168,7 +168,7 @@ static VOID AboutrEFInd(VOID)
 
     if (AboutMenu.EntryCount == 0) {
         AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT);
-        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.8.0.6");
+        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.8.0.7");
         AddMenuInfoLine(&AboutMenu, L"");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012-2014 Roderick W. Smith");
@@ -1248,9 +1248,12 @@ static BOOLEAN HasSignedCounterpart(IN REFIT_VOLUME *Volume, IN CHAR16 *Path, IN
    MergeStrings(&NewFile, Path, 0);
    MergeStrings(&NewFile, Filename, L'\\');
    MergeStrings(&NewFile, L".efi.signed", 0);
-   if (FileExists(Volume->RootDir, NewFile))
-      retval = TRUE;
-   MyFreePool(NewFile);
+   if (NewFile != NULL) {
+      CleanUpPathNameSlashes(NewFile);
+      if (FileExists(Volume->RootDir, NewFile))
+         retval = TRUE;
+      MyFreePool(NewFile);
+   } // if
 
    return retval;
 } // BOOLEAN HasSignedCounterpart()
@@ -1270,8 +1273,7 @@ static BOOLEAN ScanLoaderDir(IN REFIT_VOLUME *Volume, IN CHAR16 *Path, IN CHAR16
     BOOLEAN                 FoundFallbackDuplicate = FALSE;
 
     if ((!SelfDirPath || !Path || ((StriCmp(Path, SelfDirPath) == 0) && (Volume->DeviceHandle != SelfVolume->DeviceHandle)) ||
-           (StriCmp(Path, SelfDirPath) != 0)) &&
-           (ShouldScan(Volume, Path))) {
+           (StriCmp(Path, SelfDirPath) != 0)) && (ShouldScan(Volume, Path))) {
        // look through contents of the directory
        DirIterOpen(Volume->RootDir, Path, &DirIter);
        while (DirIterNext(&DirIter, 2, Pattern, &DirEntry)) {