From e878891ea6ae363d1b6763875094ce94b609df1b Mon Sep 17 00:00:00 2001 From: Liming Gao Date: Tue, 23 Jun 2015 10:48:04 +0000 Subject: [PATCH] BaseTools: Convert ".\\" to "" in FilePath 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 Reviewed-by: Yingke Liu 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 | 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 aa891152bf..2d07dfc667 100644 --- a/BaseTools/Source/C/Common/CommonLib.c +++ b/BaseTools/Source/C/Common/CommonLib.c @@ -671,6 +671,14 @@ Returns: *(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. @@ -679,7 +687,7 @@ Returns: *PathPointer = '\0'; strcat (mCommonLibFullPath, PathPointer + 2); } - + // // Convert "\\..\\" to last directory, because it doesn't work with WINDOWS_EXTENSION_PATH. // -- 2.39.2