Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: on Windows use UTF-8 strings instead of system default locale strings #6190

Merged
merged 18 commits into from
Feb 28, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
more missing reverts
  • Loading branch information
farfella committed Jan 20, 2020
commit 2a765768821a40c66c6c87121d3b74ac1f875181
2 changes: 1 addition & 1 deletion osquery/config/tests/test_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace {
namespace fs = boost::filesystem;

fs::path getConfDirPathImpl() {
const char* kEnvVarName = "TEST_CONF_FILES_DIR";
char const* kEnvVarName = "TEST_CONF_FILES_DIR";
auto const value_opt = osquery::getEnvVar(kEnvVarName);
EXPECT_TRUE(static_cast<bool>(value_opt))
<< "Env var " << boost::io::quoted(kEnvVarName) << " was not found, "
Expand Down
4 changes: 2 additions & 2 deletions osquery/tables/system/windows/scheduled_tasks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,11 @@ QueryData genScheduledTasks(QueryContext& context) {
enumerateTasksForFolder("\\", results);

// We attempt to derive the location of the tasks folder
auto sysRoot = getEnvVar(L"SystemRoot");
auto sysRoot = getEnvVar("SystemRoot");
if (!sysRoot.is_initialized()) {
return results;
}
auto sysTaskPath = *sysRoot + L"\\System32\\Tasks";
auto sysTaskPath = *sysRoot + "\\System32\\Tasks";

// Then process all tasks in subsequent folders
std::vector<std::string> taskPaths;
Expand Down