Skip to content

Commit

Permalink
Use AppData/Local for a the DLL cache as temp can get cleaned
Browse files Browse the repository at this point in the history
  • Loading branch information
mridgers committed Apr 8, 2019
1 parent 869c0f0 commit 8ed3cb0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion clink/app/src/loader/inject.cpp
Expand Up @@ -23,7 +23,15 @@ void puts_help(const char**, int);
static void copy_dll(str_base& dll_path)
{
str<280> target_path;
if (!os::get_temp_dir(target_path))
{
wstr<280> dir;
if (SHGetFolderPathW(0, CSIDL_LOCAL_APPDATA, nullptr, 0, dir.data()) == S_OK)
{
target_path = dir.c_str();
}
}

if (target_path.empty() && !os::get_temp_dir(target_path))
{
LOG("Unable to get temp path");
return;
Expand Down

0 comments on commit 8ed3cb0

Please sign in to comment.