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/libs/dutil/WixToolset.DUtil/sceutil.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/libs/dutil/WixToolset.DUtil/sceutil.cpp') diff --git a/src/libs/dutil/WixToolset.DUtil/sceutil.cpp b/src/libs/dutil/WixToolset.DUtil/sceutil.cpp index cdb1623b..4eede74f 100644 --- a/src/libs/dutil/WixToolset.DUtil/sceutil.cpp +++ b/src/libs/dutil/WixToolset.DUtil/sceutil.cpp @@ -1491,11 +1491,8 @@ static HRESULT CreateSqlCe( // If that failed, fallback to loading from current path if (NULL == *phSqlCeDll) { - hr = DirGetCurrent(&sczDirectory); - ExitOnFailure(hr, "Failed to get current directory"); - - hr = PathConcat(sczDirectory, wzSqlCeDllPath, &sczDllFullPath); - ExitOnFailure(hr, "Failed to concatenate current directory and DLL filename"); + hr = PathGetFullPathName(wzSqlCeDllPath, &sczDllFullPath, NULL, NULL); + ExitOnFailure(hr, "Failed to get full path for DLL"); *phSqlCeDll = ::LoadLibraryW(sczDllFullPath); ExitOnNullWithLastError(*phSqlCeDll, hr, "Failed to open Sql CE DLL: %ls", sczDllFullPath); -- cgit v1.2.3-55-g6feb