diff options
| author | Rob Mensching <rob@firegiant.com> | 2025-11-01 20:24:25 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2025-11-03 14:49:39 -0800 |
| commit | 4d626c294c4783d454e27ea4e5614037dac8576e (patch) | |
| tree | 51d822f48716e4c5ef2a51ca28925896f221b521 /src/libs/dutil/WixToolset.DUtil/path2utl.cpp | |
| parent | 33c12fa386aa7ace7a6bd06a45bc3ecf17e9c8f5 (diff) | |
| download | wix-4d626c294c4783d454e27ea4e5614037dac8576e.tar.gz wix-4d626c294c4783d454e27ea4e5614037dac8576e.tar.bz2 wix-4d626c294c4783d454e27ea4e5614037dac8576e.zip | |
Use CompareStringOrdinal() instead of CompareString() case-insensitive
This commit moves to the modern CompareStringOrdinal() for all case-insensitve
uses of CompareString() with the invariant locale.
Partially resolves 6947
Diffstat (limited to 'src/libs/dutil/WixToolset.DUtil/path2utl.cpp')
| -rw-r--r-- | src/libs/dutil/WixToolset.DUtil/path2utl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libs/dutil/WixToolset.DUtil/path2utl.cpp b/src/libs/dutil/WixToolset.DUtil/path2utl.cpp index d83a4578..06df8617 100644 --- a/src/libs/dutil/WixToolset.DUtil/path2utl.cpp +++ b/src/libs/dutil/WixToolset.DUtil/path2utl.cpp | |||
| @@ -306,7 +306,7 @@ DAPI_(HRESULT) PathCompareCanonicalized( | |||
| 306 | hr = PathCanonicalizeForComparison(wzPath2, dwDefaultFlags, &sczCanonicalized2); | 306 | hr = PathCanonicalizeForComparison(wzPath2, dwDefaultFlags, &sczCanonicalized2); |
| 307 | PathExitOnFailure(hr, "Failed to canonicalize wzPath2."); | 307 | PathExitOnFailure(hr, "Failed to canonicalize wzPath2."); |
| 308 | 308 | ||
| 309 | nResult = ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, sczCanonicalized1, -1, sczCanonicalized2, -1); | 309 | nResult = ::CompareStringOrdinal(sczCanonicalized1, -1, sczCanonicalized2, -1, TRUE); |
| 310 | PathExitOnNullWithLastError(nResult, hr, "Failed to compare canonicalized paths."); | 310 | PathExitOnNullWithLastError(nResult, hr, "Failed to compare canonicalized paths."); |
| 311 | 311 | ||
| 312 | *pfEqual = CSTR_EQUAL == nResult; | 312 | *pfEqual = CSTR_EQUAL == nResult; |
| @@ -364,7 +364,7 @@ DAPI_(HRESULT) PathDirectoryContainsPath( | |||
| 364 | ExitFunction1(hr = S_FALSE); | 364 | ExitFunction1(hr = S_FALSE); |
| 365 | } | 365 | } |
| 366 | 366 | ||
| 367 | if (CSTR_EQUAL != ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, sczCanonicalizedDirectory, (DWORD)cchDirectory, sczCanonicalizedPath, (DWORD)cchDirectory)) | 367 | if (CSTR_EQUAL != ::CompareStringOrdinal(sczCanonicalizedDirectory, (DWORD)cchDirectory, sczCanonicalizedPath, (DWORD)cchDirectory, TRUE)) |
| 368 | { | 368 | { |
| 369 | ExitFunction1(hr = S_FALSE); | 369 | ExitFunction1(hr = S_FALSE); |
| 370 | } | 370 | } |
