summaryrefslogtreecommitdiff
path: root/shim.c
diff options
context:
space:
mode:
Diffstat (limited to 'shim.c')
-rw-r--r--shim.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/shim.c b/shim.c
index 32b3ae95..7abbe8b4 100644
--- a/shim.c
+++ b/shim.c
@@ -939,7 +939,8 @@ static EFI_STATUS generate_path(EFI_LOADED_IMAGE *li, CHAR16 *ImagePath,
}
*PathName[0] = '\0';
- StrCat(*PathName, bootpath);
+ if (StrnCaseCmp(bootpath, ImagePath, StrLen(bootpath)))
+ StrCat(*PathName, bootpath);
StrCat(*PathName, ImagePath);
*grubpath = FileDevicePath(device, *PathName);