diff options
Diffstat (limited to 'src/libs')
| -rw-r--r-- | src/libs/dutil/WixToolset.DUtil/inc/pathutil.h | 10 | ||||
| -rw-r--r-- | src/libs/dutil/WixToolset.DUtil/path2utl.cpp | 19 |
2 files changed, 29 insertions, 0 deletions
diff --git a/src/libs/dutil/WixToolset.DUtil/inc/pathutil.h b/src/libs/dutil/WixToolset.DUtil/inc/pathutil.h index f36e6ebc..971ef887 100644 --- a/src/libs/dutil/WixToolset.DUtil/inc/pathutil.h +++ b/src/libs/dutil/WixToolset.DUtil/inc/pathutil.h | |||
| @@ -299,6 +299,16 @@ DAPI_(HRESULT) PathConcatRelativeToBase( | |||
| 299 | ); | 299 | ); |
| 300 | 300 | ||
| 301 | /******************************************************************* | 301 | /******************************************************************* |
| 302 | PathConcatRelativeToFullyQualifiedBase - ensures the base path is | ||
| 303 | fully qualified and then calls PathConcatRelativeToBase. | ||
| 304 | *******************************************************************/ | ||
| 305 | DAPI_(HRESULT) PathConcatRelativeToFullyQualifiedBase( | ||
| 306 | __in LPCWSTR wzBase, | ||
| 307 | __in_opt LPCWSTR wzRelative, | ||
| 308 | __deref_out_z LPWSTR* psczCombined | ||
| 309 | ); | ||
| 310 | |||
| 311 | /******************************************************************* | ||
| 302 | PathCompareCanonicalized - canonicalizes the two paths using PathCanonicalizeForComparison | 312 | PathCompareCanonicalized - canonicalizes the two paths using PathCanonicalizeForComparison |
| 303 | which does not resolve relative paths into fully qualified paths. | 313 | which does not resolve relative paths into fully qualified paths. |
| 304 | The strings are then compared using ::CompareStringW(). | 314 | The strings are then compared using ::CompareStringW(). |
diff --git a/src/libs/dutil/WixToolset.DUtil/path2utl.cpp b/src/libs/dutil/WixToolset.DUtil/path2utl.cpp index c6ff608c..3c4b2f88 100644 --- a/src/libs/dutil/WixToolset.DUtil/path2utl.cpp +++ b/src/libs/dutil/WixToolset.DUtil/path2utl.cpp | |||
| @@ -162,6 +162,25 @@ LExit: | |||
| 162 | return hr; | 162 | return hr; |
| 163 | } | 163 | } |
| 164 | 164 | ||
| 165 | DAPI_(HRESULT) PathConcatRelativeToFullyQualifiedBase( | ||
| 166 | __in LPCWSTR wzBase, | ||
| 167 | __in_opt LPCWSTR wzRelative, | ||
| 168 | __deref_out_z LPWSTR* psczCombined | ||
| 169 | ) | ||
| 170 | { | ||
| 171 | HRESULT hr = S_OK; | ||
| 172 | |||
| 173 | if (!PathIsFullyQualified(wzBase)) | ||
| 174 | { | ||
| 175 | PathExitWithRootFailure(hr, E_INVALIDARG, "wzBase must be fully qualified: %ls.", wzBase); | ||
| 176 | } | ||
| 177 | |||
| 178 | hr = PathConcatRelativeToBase(wzBase, wzRelative, psczCombined); | ||
| 179 | |||
| 180 | LExit: | ||
| 181 | return hr; | ||
| 182 | } | ||
| 183 | |||
| 165 | DAPI_(HRESULT) PathCompareCanonicalized( | 184 | DAPI_(HRESULT) PathCompareCanonicalized( |
| 166 | __in_z LPCWSTR wzPath1, | 185 | __in_z LPCWSTR wzPath1, |
| 167 | __in_z LPCWSTR wzPath2, | 186 | __in_z LPCWSTR wzPath2, |
