From 8a4d03207633e9fdc364aaed82bd167f844679f9 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Fri, 3 Jun 2022 17:47:31 -0500 Subject: Resolve paths while parsing them from the command line. The current directory is a process wide setting that can potentially be changed by any thread. Remove fileutil methods that had equivalent pathutil methods. --- src/burn/engine/logging.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/burn/engine/logging.cpp') diff --git a/src/burn/engine/logging.cpp b/src/burn/engine/logging.cpp index 8e89957b..3a403025 100644 --- a/src/burn/engine/logging.cpp +++ b/src/burn/engine/logging.cpp @@ -84,9 +84,6 @@ extern "C" HRESULT LoggingOpen( { DWORD cRetry = 0; - hr = DirGetCurrent(&sczLoggingBaseFolder); - ExitOnFailure(hr, "Failed to get current directory."); - // Try pretty hard to open the log file when appending. do { @@ -95,7 +92,7 @@ extern "C" HRESULT LoggingOpen( ::Sleep(LOG_OPEN_RETRY_WAIT); } - hr = LogOpen(sczLoggingBaseFolder, pLog->sczPath, NULL, NULL, pLog->dwAttributes & BURN_LOGGING_ATTRIBUTE_APPEND, FALSE, &pLog->sczPath); + hr = LogOpen(NULL, pLog->sczPath, NULL, NULL, pLog->dwAttributes & BURN_LOGGING_ATTRIBUTE_APPEND, FALSE, &pLog->sczPath); if (pLog->dwAttributes & BURN_LOGGING_ATTRIBUTE_APPEND && HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION) == hr) { ++cRetry; -- cgit v1.2.3-55-g6feb