From: qwang12 Date: Tue, 1 Apr 2008 12:40:21 +0000 (+0000) Subject: Fix a bug that BMM trim the name such as ".\...Name" to ".Name". The "\.." should... X-Git-Tag: edk2-stable201903~21228 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=243324fc4d9f35847735776b2033004d05e66baa Fix a bug that BMM trim the name such as ".\...Name" to ".Name". The "\.." should only be merged with the previous path node if it is "\..\" git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4974 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/MdeModulePkg/Universal/BdsDxe/BootMaint/BootOption.c b/MdeModulePkg/Universal/BdsDxe/BootMaint/BootOption.c index 57fcf4d732..c329d96f95 100644 --- a/MdeModulePkg/Universal/BdsDxe/BootMaint/BootOption.c +++ b/MdeModulePkg/Universal/BdsDxe/BootMaint/BootOption.c @@ -1165,7 +1165,7 @@ Returns: Ptr = Str; LastSlash = Str; while (*Ptr != 0) { - if (*Ptr == '\\' && *(Ptr + 1) == '.' && *(Ptr + 2) == '.' && *(Ptr + 3) != 0) { + if (*Ptr == '\\' && *(Ptr + 1) == '.' && *(Ptr + 2) == '.' && *(Ptr + 3) == L'\\') { // // Convert "\Name\..\" to "\" // DO NOT convert the .. if it is at the end of the string. This will