diff --git a/src/ext/ca/wixca/dll/RemoveFoldersEx.cpp b/src/ext/ca/wixca/dll/RemoveFoldersEx.cpp index af138ebd4..30e6516a8 100644 --- a/src/ext/ca/wixca/dll/RemoveFoldersEx.cpp +++ b/src/ext/ca/wixca/dll/RemoveFoldersEx.cpp @@ -62,21 +62,18 @@ static HRESULT RecursePath( // See https://learn.microsoft.com/en-us/windows/win32/fileio/reparse-point-tags, https://learn.microsoft.com/en-us/windows/win32/fileio/determining-whether-a-directory-is-a-volume-mount-point if (FILE_ATTRIBUTE_REPARSE_POINT == (wfd.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) && (IO_REPARSE_TAG_SYMLINK == wfd.dwReserved0 || IO_REPARSE_TAG_MOUNT_POINT == wfd.dwReserved0)) { - hr = StrAllocFormatted(&sczNext, L"%s%s", wzPath, wfd.cFileName); - ExitOnFailure(hr, "Failed to concat filename '%S' to string: %S", wfd.cFileName, wzPath); - hr = StrAllocFormatted(&sczProperty, L"_%s_%u", wzProperty, *pdwCounter); ExitOnFailure(hr, "Failed to allocate Property for RemoveFile table with property: %S.", wzProperty); ++(*pdwCounter); - hr = WcaSetProperty(sczProperty, sczNext); + hr = WcaSetProperty(sczProperty, wzPath); ExitOnFailure(hr, "Failed to set Property: %S with path: %S", sczProperty, wzPath); - hr = WcaAddTempRecord(phTable, phColumns, L"RemoveFile", NULL, 1, 5, L"RfxFolder", wzComponent, NULL, sczProperty, iMode); + hr = WcaAddTempRecord(phTable, phColumns, L"RemoveFile", NULL, 1, 5, L"RfxFile", wzComponent, wfd.cFileName, sczProperty, iMode); ExitOnFailure(hr, "Failed to add row to remove reparse point for WixRemoveFolderEx row: %S under path: %S", wzId, wzPath); - WcaLog(LOGLEVEL::LOGMSG_STANDARD, "Path '%ls' is a symbolic link or a mounted folder. The link itself will be removed and its target will not be changed", sczNext); + WcaLog(LOGLEVEL::LOGMSG_STANDARD, "Path '%ls%ls' is a symbolic link or a mounted folder. The link itself will be removed and its target will not be changed", wzPath, wfd.cFileName); continue; }