summaryrefslogtreecommitdiffhomepage
path: root/windows/nsis-plugins/src/cleanup/cleaningops.cpp
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2021-07-08 15:19:02 +0200
committerDavid Lönnhager <david.l@mullvad.net>2021-07-08 17:40:59 +0200
commitaa140c4d00fee56a74569b4a572dc25a82e801c5 (patch)
tree3f2c5415a2c1b2f46c58d38a7cac19be2bbd783e /windows/nsis-plugins/src/cleanup/cleaningops.cpp
parent88a05b7d062183a63c53b6b2471beddedb60b728 (diff)
downloadmullvadvpn-aa140c4d00fee56a74569b4a572dc25a82e801c5.tar.xz
mullvadvpn-aa140c4d00fee56a74569b4a572dc25a82e801c5.zip
Remove superfluous arguments
Diffstat (limited to 'windows/nsis-plugins/src/cleanup/cleaningops.cpp')
-rw-r--r--windows/nsis-plugins/src/cleanup/cleaningops.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/windows/nsis-plugins/src/cleanup/cleaningops.cpp b/windows/nsis-plugins/src/cleanup/cleaningops.cpp
index b0b3fa4631..3a7ac99abf 100644
--- a/windows/nsis-plugins/src/cleanup/cleaningops.cpp
+++ b/windows/nsis-plugins/src/cleanup/cleaningops.cpp
@@ -75,7 +75,7 @@ std::wstring GetSystemUserLocalAppData()
common::security::AdjustCurrentProcessTokenPrivilege(L"SeDebugPrivilege", false);
};
- auto systemDir = common::fs::GetKnownFolderPath(FOLDERID_System, KF_FLAG_DEFAULT, NULL);
+ auto systemDir = common::fs::GetKnownFolderPath(FOLDERID_System);
auto lsassPath = std::filesystem::path(systemDir).append(L"lsass.exe");
auto lsassPid = common::process::GetProcessIdFromName(lsassPath);
@@ -107,7 +107,7 @@ std::wstring GetSystemUserLocalAppData()
std::filesystem::path GetSystemCacheDirectory()
{
- const auto programData = common::fs::GetKnownFolderPath(FOLDERID_ProgramData, KF_FLAG_DEFAULT, nullptr);
+ const auto programData = common::fs::GetKnownFolderPath(FOLDERID_ProgramData);
return std::filesystem::path(programData).append(L"Mullvad VPN").append(L"cache");
}
@@ -175,12 +175,12 @@ void MigrateCacheServiceUser()
void RemoveLogsCacheCurrentUser()
{
- const auto localAppData = common::fs::GetKnownFolderPath(FOLDERID_LocalAppData, KF_FLAG_DEFAULT, nullptr);
+ const auto localAppData = common::fs::GetKnownFolderPath(FOLDERID_LocalAppData);
const auto appdir = std::filesystem::path(localAppData).append(L"Mullvad VPN");
std::filesystem::remove_all(appdir);
- const auto roamingAppData = common::fs::GetKnownFolderPath(FOLDERID_RoamingAppData, KF_FLAG_DEFAULT, nullptr);
+ const auto roamingAppData = common::fs::GetKnownFolderPath(FOLDERID_RoamingAppData);
const auto roamingAppdir = std::filesystem::path(roamingAppData).append(L"Mullvad VPN");
std::error_code dummy;
@@ -196,9 +196,9 @@ void RemoveLogsCacheOtherUsers()
// as a node somewhere beneath the home directory.
//
- auto localAppData = common::fs::GetKnownFolderPath(FOLDERID_LocalAppData, KF_FLAG_DEFAULT, nullptr);
- auto roamingAppData = common::fs::GetKnownFolderPath(FOLDERID_RoamingAppData, KF_FLAG_DEFAULT, nullptr);
- auto homeDir = common::fs::GetKnownFolderPath(FOLDERID_Profile, KF_FLAG_DEFAULT, nullptr);
+ auto localAppData = common::fs::GetKnownFolderPath(FOLDERID_LocalAppData);
+ auto roamingAppData = common::fs::GetKnownFolderPath(FOLDERID_RoamingAppData);
+ auto homeDir = common::fs::GetKnownFolderPath(FOLDERID_Profile);
//
// Tokenize to get rid of slashes pointing in different directions.
@@ -246,7 +246,7 @@ void RemoveLogsCacheOtherUsers()
// respective app data dirs.
//
- auto parentHomeDir = common::fs::GetKnownFolderPath(FOLDERID_UserProfiles, KF_FLAG_DEFAULT, nullptr);
+ auto parentHomeDir = common::fs::GetKnownFolderPath(FOLDERID_UserProfiles);
common::fs::FileEnumerator files(parentHomeDir);
@@ -283,7 +283,7 @@ void RemoveLogsCacheOtherUsers()
void RemoveLogsServiceUser()
{
- const auto programData = common::fs::GetKnownFolderPath(FOLDERID_ProgramData, KF_FLAG_DEFAULT, nullptr);
+ const auto programData = common::fs::GetKnownFolderPath(FOLDERID_ProgramData);
const auto appdir = std::filesystem::path(programData).append(L"Mullvad VPN");
{