From c29e9d654d8743049ecc082ba8a414731f727a6e Mon Sep 17 00:00:00 2001 From: LukeFZ Date: Sun, 1 Nov 2020 18:40:13 +0100 Subject: [PATCH] Fix bug in createJunction (#43) Custom dump directory now works properly and doesnt cause 'Access Denied' errors --- UWPInjector/source/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UWPInjector/source/main.cpp b/UWPInjector/source/main.cpp index b938a70..b4ade89 100644 --- a/UWPInjector/source/main.cpp +++ b/UWPInjector/source/main.cpp @@ -58,10 +58,10 @@ static DWORD CreateJunction(LPCSTR szJunction, LPCSTR szPath) DWORD LastError = ERROR_SUCCESS; std::byte buf[sizeof(REPARSE_MOUNTPOINT_DATA_BUFFER) + MAX_PATH * sizeof(WCHAR)] = {}; REPARSE_MOUNTPOINT_DATA_BUFFER& ReparseBuffer = (REPARSE_MOUNTPOINT_DATA_BUFFER&)buf; - char szTarget[MAX_PATH] = {}; + char szTarget[MAX_PATH] = "\\??\\"; strcat_s(szTarget, szPath); - strcat_s(szTarget, "\\"); + // strcat_s(szTarget, "\\"); if( !CreateDirectory(szJunction, nullptr) ) return GetLastError();