diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2022-06-03 17:48:39 -0500 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2022-06-07 19:44:36 -0500 |
| commit | 6b0f2d978504da82070523eb6adb0b59f9812e93 (patch) | |
| tree | 6f0b258519a0f51bf589e4313206b3ffeaa32a41 /src/burn/engine/logging.cpp | |
| parent | b652e93a460b4b822a01382e5992f96f1d805ffe (diff) | |
| download | wix-6b0f2d978504da82070523eb6adb0b59f9812e93.tar.gz wix-6b0f2d978504da82070523eb6adb0b59f9812e93.tar.bz2 wix-6b0f2d978504da82070523eb6adb0b59f9812e93.zip | |
Add PathSkipPastRoot.
Diffstat (limited to 'src/burn/engine/logging.cpp')
| -rw-r--r-- | src/burn/engine/logging.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/burn/engine/logging.cpp b/src/burn/engine/logging.cpp index 3a403025..77f5079c 100644 --- a/src/burn/engine/logging.cpp +++ b/src/burn/engine/logging.cpp | |||
| @@ -134,10 +134,12 @@ extern "C" HRESULT LoggingOpen( | |||
| 134 | 134 | ||
| 135 | if (sczPrefixFormatted && *sczPrefixFormatted) | 135 | if (sczPrefixFormatted && *sczPrefixFormatted) |
| 136 | { | 136 | { |
| 137 | // Best effort to open default logging. | ||
| 137 | LPCWSTR wzPrefix = sczPrefixFormatted; | 138 | LPCWSTR wzPrefix = sczPrefixFormatted; |
| 139 | LPCWSTR wzPastRoot = PathSkipPastRoot(sczPrefixFormatted, NULL, NULL, NULL); | ||
| 138 | 140 | ||
| 139 | // Best effort to open default logging. | 141 | // If the log path is rooted and has a file component, then use that path as is. |
| 140 | if (PathIsRooted(sczPrefixFormatted)) | 142 | if (wzPastRoot && *wzPastRoot) |
| 141 | { | 143 | { |
| 142 | hr = PathGetDirectory(sczPrefixFormatted, &sczLoggingBaseFolder); | 144 | hr = PathGetDirectory(sczPrefixFormatted, &sczLoggingBaseFolder); |
| 143 | ExitOnFailure(hr, "Failed to get parent directory from '%ls'.", sczPrefixFormatted); | 145 | ExitOnFailure(hr, "Failed to get parent directory from '%ls'.", sczPrefixFormatted); |
