diff options
Diffstat (limited to 'windows/nsis-plugins/src/cleanup/cleaningops.cpp')
| -rw-r--r-- | windows/nsis-plugins/src/cleanup/cleaningops.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/windows/nsis-plugins/src/cleanup/cleaningops.cpp b/windows/nsis-plugins/src/cleanup/cleaningops.cpp index 3a0764d91c..dec5ec198f 100644 --- a/windows/nsis-plugins/src/cleanup/cleaningops.cpp +++ b/windows/nsis-plugins/src/cleanup/cleaningops.cpp @@ -272,4 +272,18 @@ void RemoveSettingsServiceUser() RemoveDirectoryW(std::wstring(L"\\\\?\\").append(mullvadAppData).c_str()); } +void RemoveRelayCacheServiceUser() +{ + const auto localAppData = GetSystemUserLocalAppData(); + const auto mullvadAppData = std::experimental::filesystem::path(localAppData).append(L"Mullvad VPN"); + + common::fs::ScopedNativeFileSystem nativeFileSystem; + + common::security::AddAdminToObjectDacl(mullvadAppData, SE_FILE_OBJECT); + + const auto cacheFile = std::experimental::filesystem::path(mullvadAppData).append(L"relays.json"); + + std::experimental::filesystem::remove(cacheFile); +} + } |
