Dennis,  

I notice that after this ".\\", the code looks for "\\.\\" and "\\..\\".  I 
think that the order may be wrong wince if you remove all the ".\\", then none 
of the "\\.\\" and "\\..\\" will ever get found...  either that or we are doing 
extra checks that are unnecessary...

-Jaben


>-----Original Message-----
>From: Liu, Yingke D [mailto:[email protected]]
>Sent: Thursday, June 18, 2015 10:33 PM
>To: [email protected]
>Subject: Re: [edk2] [Patch] BaseTools: Convert ".\\" to "" in FilePath
>
>Reviewed-by: Yingke Liu <[email protected]>
>
>Dennis
>
>-----Original Message-----
>From: Liming Gao [mailto:[email protected]]
>Sent: Friday, June 19, 2015 9:30
>To: [email protected]
>Subject: [edk2] [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 <[email protected]>
>---
> 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
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/edk2-devel
>
>------------------------------------------------------------------------------
>_______________________________________________
>edk2-devel mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to