diff options
| author | David Lönnhager <david.l@mullvad.net> | 2021-07-08 15:19:02 +0200 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2021-07-08 17:40:59 +0200 |
| commit | aa140c4d00fee56a74569b4a572dc25a82e801c5 (patch) | |
| tree | 3f2c5415a2c1b2f46c58d38a7cac19be2bbd783e | |
| parent | 88a05b7d062183a63c53b6b2471beddedb60b728 (diff) | |
| download | mullvadvpn-aa140c4d00fee56a74569b4a572dc25a82e801c5.tar.xz mullvadvpn-aa140c4d00fee56a74569b4a572dc25a82e801c5.zip | |
Remove superfluous arguments
| -rw-r--r-- | windows/nsis-plugins/src/cleanup/cleaningops.cpp | 18 | ||||
| -rw-r--r-- | windows/nsis-plugins/src/log/log.cpp | 4 | ||||
| -rw-r--r-- | windows/nsis-plugins/src/osinfo/update.cpp | 2 | ||||
| -rw-r--r-- | windows/nsis-plugins/src/tray/tray.cpp | 2 | ||||
| -rw-r--r-- | windows/windns/src/windns/netsh.cpp | 2 | ||||
| m--------- | windows/windows-libraries | 0 |
6 files changed, 14 insertions, 14 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"); { diff --git a/windows/nsis-plugins/src/log/log.cpp b/windows/nsis-plugins/src/log/log.cpp index 4a7bf1bf49..23ca329eb1 100644 --- a/windows/nsis-plugins/src/log/log.cpp +++ b/windows/nsis-plugins/src/log/log.cpp @@ -93,7 +93,7 @@ std::wstring GetWindowsVersion() { common::fs::ScopedNativeFileSystem nativeFileSystem; - const auto systemDir = common::fs::GetKnownFolderPath(FOLDERID_System, 0, nullptr); + const auto systemDir = common::fs::GetKnownFolderPath(FOLDERID_System); const auto systemModule = std::filesystem::path(systemDir).append(L"ntoskrnl.exe"); DWORD dummy; @@ -244,7 +244,7 @@ void __declspec(dllexport) NSISCALL SetLogTarget } auto logpath = std::filesystem::path(common::fs::GetKnownFolderPath( - FOLDERID_ProgramData, 0, nullptr)); + FOLDERID_ProgramData)); logpath.append(L"Mullvad VPN"); if (FALSE == CreateDirectoryW(logpath.c_str(), nullptr)) diff --git a/windows/nsis-plugins/src/osinfo/update.cpp b/windows/nsis-plugins/src/osinfo/update.cpp index 4f33310236..4b62bc05f9 100644 --- a/windows/nsis-plugins/src/osinfo/update.cpp +++ b/windows/nsis-plugins/src/osinfo/update.cpp @@ -25,7 +25,7 @@ bool HasSetupApiSha2Fix() common::fs::ScopedNativeFileSystem nativeFileSystem; - const auto systemDir = common::fs::GetKnownFolderPath(FOLDERID_System, KF_FLAG_DEFAULT, NULL); + const auto systemDir = common::fs::GetKnownFolderPath(FOLDERID_System); const auto setupApiPath = std::filesystem::path(systemDir).append(L"setupapi.dll"); const auto setupApiHandle = CreateFileW( diff --git a/windows/nsis-plugins/src/tray/tray.cpp b/windows/nsis-plugins/src/tray/tray.cpp index e4a96637e3..34205059bc 100644 --- a/windows/nsis-plugins/src/tray/tray.cpp +++ b/windows/nsis-plugins/src/tray/tray.cpp @@ -47,7 +47,7 @@ void UpdateRegistry(common::registry::RegistryKey ®key, const std::wstring &v // Construct path to 'explorer.exe' // - const auto windir = common::fs::GetKnownFolderPath(FOLDERID_Windows, 0, nullptr); + const auto windir = common::fs::GetKnownFolderPath(FOLDERID_Windows); const auto explorer = std::filesystem::path(windir).append(L"explorer.exe"); // diff --git a/windows/windns/src/windns/netsh.cpp b/windows/windns/src/windns/netsh.cpp index 6cd529fce4..2a4162724d 100644 --- a/windows/windns/src/windns/netsh.cpp +++ b/windows/windns/src/windns/netsh.cpp @@ -36,7 +36,7 @@ __declspec(noreturn) void ThrowWithDetails(std::string &&error, common::process: NetSh::NetSh(std::shared_ptr<common::logging::ILogSink> logSink) : m_logSink(logSink) { - const auto system32 = common::fs::GetKnownFolderPath(FOLDERID_System, 0, nullptr); + const auto system32 = common::fs::GetKnownFolderPath(FOLDERID_System); m_netShPath = std::filesystem::path(system32).append(L"netsh.exe"); } diff --git a/windows/windows-libraries b/windows/windows-libraries -Subproject c5cf301ea23fd1aaa6775be576750f8a7b3a9c5 +Subproject 24eb50a37ae40d62093f147c44bffc0d3818bef |
