Skip to content

Commit

Permalink
bugfix: Build error in payload dist tool.
Browse files Browse the repository at this point in the history
Fixes #7933.
  • Loading branch information
corwin-of-amber authored and rogerwang committed Aug 4, 2022
1 parent 3775206 commit dea35b9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tools/payload.cc
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,17 @@ MyComputedHashes::Writer::~Writer() {
void MyComputedHashes::Writer::AddHash(const base::FilePath& relative_path,
int block_size,
const std::string& root) {
base::DictionaryValue* dict = new base::DictionaryValue();
file_list_->Append(base::WrapUnique(dict));
dict->SetString(kPathKey,
relative_path.NormalizePathSeparatorsTo('/').AsUTF8Unsafe());
//dict->SetInteger(kBlockSizeKey, block_size);
base::DictionaryValue dict;
dict.SetString(kPathKey,
relative_path.NormalizePathSeparatorsTo('/').AsUTF8Unsafe());
//dict.SetInteger(kBlockSizeKey, block_size);
std::string encoded;
base::Base64Encode(root, &encoded);
base::ReplaceChars(encoded, "=", "", &encoded);
base::ReplaceChars(encoded, "/", "_", &encoded);
base::ReplaceChars(encoded, "+", "-", &encoded);
dict->SetString(kBlockHashesKey, encoded);
dict.SetString(kBlockHashesKey, encoded);
file_list_->Append(std::move(dict));
}

bool MyComputedHashes::Writer::WriteToFile(const base::FilePath& path) {
Expand Down

0 comments on commit dea35b9

Please sign in to comment.