]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Convert ".\\" to "" in FilePath
authorLiming Gao <liming.gao@intel.com>
Tue, 23 Jun 2015 10:48:04 +0000 (10:48 +0000)
committerlgao4 <lgao4@Edk2>
Tue, 23 Jun 2015 10:48:04 +0000 (10:48 +0000)
Convert ".\\" to "", because it doesn't work with WINDOWS_EXTENSION_PATH.
WINDOWS_EXTENSION_PATH can support the file path larger than 260 length.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Yingke Liu <yingke.d.liu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17686 6f19259b-4bc3-4df7-8a09-765794883524

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