From 718582ccbc9fc23d4145b50c05f80f742bdc7746 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 7 Nov 2023 20:22:20 +0100 Subject: [PATCH] Do not have windows-libraries depend on mullvad-nsis --- windows/nsis-plugins/src/log/log.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/windows/nsis-plugins/src/log/log.cpp b/windows/nsis-plugins/src/log/log.cpp index be8f7a6da0dc..fb277ec6bade 100644 --- a/windows/nsis-plugins/src/log/log.cpp +++ b/windows/nsis-plugins/src/log/log.cpp @@ -12,6 +12,7 @@ #include #include #include +#include Logger *g_logger = nullptr; @@ -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(w_path))) + { + THROW_ERROR("Failed to create privileged directory"); + } logpath.append(logfile);