Skip to content

Commit

Permalink
Fix WebDiscovery Windows FilePath append
Browse files Browse the repository at this point in the history
  • Loading branch information
DJAndries committed Jul 4, 2024
1 parent 0a15ebe commit a81304d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ class WebDiscoveryContentScraperTest : public PlatformBrowserTest {
InitScraper();
run_loop_ = std::make_unique<base::RunLoop>();

ASSERT_TRUE(
base::ReadFileToString(data_path.Append("page.html"), &page_content_));
ASSERT_TRUE(base::ReadFileToString(data_path.AppendASCII("page.html"),
&page_content_));
}

protected:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ class WebDiscoveryCredentialManagerTest : public testing::Test {
base::PathService::CheckedGet(brave::DIR_TEST_DATA);
std::string test_data_json;
ASSERT_TRUE(base::ReadFileToString(
data_path.Append("web_discovery/credential_keys_and_responses.json"),
data_path.AppendASCII(
"web_discovery/credential_keys_and_responses.json"),
&test_data_json));
auto test_data_value = base::JSONReader::Read(test_data_json);
ASSERT_TRUE(test_data_value);
Expand Down
2 changes: 1 addition & 1 deletion components/web_discovery/browser/server_config_loader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ ServerConfigLoader::ServerConfigLoader(
quorum_config_url_ = GURL(GetQuorumHost() + kQuorumConfigPath);
patterns_url_ = GetPatternsEndpoint();

patterns_path_ = user_data_dir.Append(kPatternsFilename);
patterns_path_ = user_data_dir.AppendASCII(kPatternsFilename);
}

ServerConfigLoader::~ServerConfigLoader() = default;
Expand Down

0 comments on commit a81304d

Please sign in to comment.