]> code.delx.au - refind/blobdiff - refind/lib.c
Change to install.sh to fix bug when installing to ESP on recent
[refind] / refind / lib.c
index 2e06c96aa2d58f4dc511ec79e825f58990b5beda..ee8acd99a274814d9f2e5e44289db94f4bc0d846 100644 (file)
@@ -201,6 +201,11 @@ EFI_STATUS InitRefitLib(IN EFI_HANDLE ImageHandle)
 // called before running external programs to close open file handles
 VOID UninitRefitLib(VOID)
 {
+    // This piece of code was made to correspond to weirdness in ReinitRefitLib().
+    // See the comment on it there.
+    if(SelfRootDir == SelfVolume->RootDir)
+        SelfRootDir=0;
+
     UninitVolumes();
 
     if (SelfDir != NULL) {