mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-29 22:20:48 +00:00
windows: Ignore OneDrive in PATH. It leads to false positives
This commit is contained in:
parent
a7edfa221e
commit
0a6f9ed967
@ -115,14 +115,16 @@ LOG_CHANNEL(q_debug, "QDEBUG");
|
|||||||
std::set<std::string> get_one_drive_paths()
|
std::set<std::string> get_one_drive_paths()
|
||||||
{
|
{
|
||||||
std::set<std::string> paths;
|
std::set<std::string> paths;
|
||||||
for (const char* key : { "OneDrive", "OneDriveConsumer", "OneDriveCommercial" })
|
|
||||||
{
|
// NOTE: Disabled. The environment variables can lead to false positives.
|
||||||
if (const char* env_path = std::getenv(key))
|
//for (const char* key : { "OneDrive", "OneDriveConsumer", "OneDriveCommercial" })
|
||||||
{
|
//{
|
||||||
sys_log.notice("get_one_drive_paths: Found OneDrive env path: '%s' (key='%s')", env_path, key);
|
// if (const char* env_path = std::getenv(key))
|
||||||
paths.insert(env_path);
|
// {
|
||||||
}
|
// sys_log.notice("get_one_drive_paths: Found OneDrive env path: '%s' (key='%s')", env_path, key);
|
||||||
}
|
// paths.insert(env_path);
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
for (const wchar_t* key : { L"Software\\Microsoft\\OneDrive\\Accounts\\Personal" })
|
for (const wchar_t* key : { L"Software\\Microsoft\\OneDrive\\Accounts\\Personal" })
|
||||||
{
|
{
|
||||||
@ -135,7 +137,6 @@ std::set<std::string> get_one_drive_paths()
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::wstring path_buffer;
|
std::wstring path_buffer;
|
||||||
static_cast<DWORD>(path_buffer.size() - 1);
|
|
||||||
DWORD type = 0U;
|
DWORD type = 0U;
|
||||||
|
|
||||||
do
|
do
|
||||||
@ -154,7 +155,7 @@ std::set<std::string> get_one_drive_paths()
|
|||||||
|
|
||||||
if (status != ERROR_SUCCESS)
|
if (status != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
sys_log.error("get_one_drive_paths: RegQueryValueExW failed: %s", fmt::win_error{static_cast<unsigned long>(status), nullptr});
|
sys_log.trace("get_one_drive_paths: RegQueryValueExW failed: %s", fmt::win_error{static_cast<unsigned long>(status), nullptr});
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user