Skip to content

Commit

Permalink
Fix bug in createJunction (#43)
Browse files Browse the repository at this point in the history
Custom dump directory now works properly and doesnt cause 'Access Denied' errors
  • Loading branch information
LukeFZ authored Nov 1, 2020
1 parent 8a8fac6 commit c29e9d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions UWPInjector/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit c29e9d6

Please sign in to comment.