]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/Common/CommonLib.c
BaseTools: Convert ".\\" to "" in FilePath
[mirror_edk2.git] / BaseTools / Source / C / Common / CommonLib.c
index aa891152bf3eca563e21475bbd7c2e9ea55a2838..2d07dfc667b19b3c9fc3c7cef7af1b713ff6b6c4 100644 (file)
@@ -671,6 +671,14 @@ Returns:
       *(PathPointer + 2) = '\0';\r
       strcat (mCommonLibFullPath, PathPointer + 3);\r
     }\r
+    \r
+    //\r
+    // Convert ".\\" to "", because it doesn't work with WINDOWS_EXTENSION_PATH.\r
+    //\r
+    while ((PathPointer = strstr (mCommonLibFullPath, ".\\")) != NULL) {\r
+      *PathPointer = '\0';\r
+      strcat (mCommonLibFullPath, PathPointer + 2);\r
+    }\r
         \r
     //\r
     // Convert "\\.\\" to "\\", because it doesn't work with WINDOWS_EXTENSION_PATH.\r
@@ -679,7 +687,7 @@ Returns:
       *PathPointer = '\0';\r
       strcat (mCommonLibFullPath, PathPointer + 2);\r
     }\r
-    \r
+\r
     //\r
     // Convert "\\..\\" to last directory, because it doesn't work with WINDOWS_EXTENSION_PATH.\r
     //\r