fix(file_handler): avoid writing extra newline character (#2335)
This commit is contained in:
parent
6674090052
commit
659a426b03
2 changed files with 46 additions and 15 deletions
|
|
@ -31,16 +31,7 @@ namespace file_handler {
|
|||
}
|
||||
|
||||
std::ifstream in(path);
|
||||
|
||||
std::string input;
|
||||
std::string base64_cert;
|
||||
|
||||
while (!in.eof()) {
|
||||
std::getline(in, input);
|
||||
base64_cert += input + '\n';
|
||||
}
|
||||
|
||||
return base64_cert;
|
||||
return std::string { (std::istreambuf_iterator<char>(in)), std::istreambuf_iterator<char>() };
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue