Skip to content

Commit

Permalink
Do not have windows-libraries depend on mullvad-nsis
Browse files Browse the repository at this point in the history
  • Loading branch information
Jontified committed Nov 7, 2023
1 parent fa5e74f commit 718582c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion windows/nsis-plugins/src/log/log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <sstream>
#include <iomanip>
#include <filesystem>
#include <mullvad-nsis.h>

Logger *g_logger = nullptr;

Expand Down Expand Up @@ -293,7 +294,12 @@ void __declspec(dllexport) NSISCALL SetLogTarget
FOLDERID_ProgramData));
logpath.append(L"Mullvad VPN");

common::fs::CreatePrivilegedDirectory(logpath);
const wchar_t* w_path = path.wstring().c_str();

if (Status::Ok != create_privileged_directory(reinterpret_cast<const uint16_t*>(w_path)))
{
THROW_ERROR("Failed to create privileged directory");
}

logpath.append(logfile);

Expand Down

0 comments on commit 718582c

Please sign in to comment.