edk2/BaseTools/Source/Python/Common
Yang Gang 3ac092cf72 BaseTools: Clean up os.path.normcase and os.path.normpath usage
Refer to the docs of python, `os.path.normcase(path)` function:
"Normalize the case of a pathname. On Windows, convert all characters in
the pathname to lowercase, and also convert forward slashes to backward
slashes. On other operating systems, return the path unchanged."

`os.path.normpath(path)` also convert forward slashes to backward slashes.

So call `os.path.normcase` after `os.path.normpath` just convert path to
lowercase on Windows(only).

And Windows is case-insensitive but case-preserving.

So the usage of `os.path.normcase(os.path.normpath(path))` can be
simplified to `os.path.normpath(path)`. Then we can use case-preserving
paths rather than lowercase paths in compile_commands.json file
or build log.

But this patch continue to use `os.path.normcase`
when comparing/searching paths.

Signed-off-by: Yang Gang <yanggang@byosoft.com.cn>
2025-01-09 07:25:45 +00:00
..
Edk2 BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
Uefi BaseTools: Improve error messages from UefiCapsuleHeader.py 2024-12-06 13:02:18 +00:00
__init__.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
BuildToolError.py BaseTools:Add the spare space FV image size checker 2020-04-23 01:29:34 +00:00
BuildVersion.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
caching.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
DataType.py BaseTools: Updated build tools to support new LoongArch. 2022-10-14 02:16:33 +00:00
EdkLogger.py BaseTools: Enable block queue log agent. 2019-08-09 23:15:55 +08:00
Expression.py BaseTools: Resolve regex syntax warnings 2023-12-21 00:33:31 +00:00
GlobalData.py BaseTools: Update Stack Cookie Logic 2024-09-13 03:58:46 +00:00
LongFilePathOs.py BaseTools:Introduce CopyFileOnChange() function to copy cache files 2019-06-17 17:00:46 +08:00
LongFilePathOsPath.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
LongFilePathSupport.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
Misc.py BaseTools: Fix raw strings containing valid escape characters 2024-01-10 13:54:01 +00:00
MultipleWorkspace.py BaseTools: Clean up os.path.normcase and os.path.normpath usage 2025-01-09 07:25:45 +00:00
Parsing.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
RangeExpression.py BaseTools:change some incorrect parameter defaults 2019-09-17 10:18:51 +08:00
StringUtils.py BaseTools:change some incorrect parameter defaults 2019-09-17 10:18:51 +08:00
TargetTxtClassObject.py BaseTools: Clean up os.path.normcase and os.path.normpath usage 2025-01-09 07:25:45 +00:00
ToolDefClassObject.py BaseTools: Resolve regex syntax warnings 2023-12-21 00:33:31 +00:00
VariableAttributes.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
VpdInfoFile.py BaseTools: Correct BPDG tool error prints 2022-10-19 06:32:07 +00:00