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....@intel.com>
---
 BaseTools/Source/C/Common/CommonLib.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Source/C/Common/CommonLib.c 
b/BaseTools/Source/C/Common/CommonLib.c
index aa89115..2d07dfc 100644
--- a/BaseTools/Source/C/Common/CommonLib.c
+++ b/BaseTools/Source/C/Common/CommonLib.c
@@ -669,19 +669,27 @@ Returns:
     //
     if ((PathPointer = strstr (mCommonLibFullPath, ":\\\\")) != NULL) {
       *(PathPointer + 2) = '\0';
       strcat (mCommonLibFullPath, PathPointer + 3);
     }
+    
+    //
+    // Convert ".\\" to "", because it doesn't work with 
WINDOWS_EXTENSION_PATH.
+    //
+    while ((PathPointer = strstr (mCommonLibFullPath, ".\\")) != NULL) {
+      *PathPointer = '\0';
+      strcat (mCommonLibFullPath, PathPointer + 2);
+    }
         
     //
     // Convert "\\.\\" to "\\", because it doesn't work with 
WINDOWS_EXTENSION_PATH.
     //
     while ((PathPointer = strstr (mCommonLibFullPath, "\\.\\")) != NULL) {
       *PathPointer = '\0';
       strcat (mCommonLibFullPath, PathPointer + 2);
     }
-    
+
     //
     // Convert "\\..\\" to last directory, because it doesn't work with 
WINDOWS_EXTENSION_PATH.
     //
     while ((PathPointer = strstr (mCommonLibFullPath, "\\..\\")) != NULL) {
       NextPointer = PathPointer + 3;
-- 
1.9.5.msysgit.0


------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to