Merge "Handle empty read from file." into main
This commit is contained in:
commit
d05c6ad1e6
1 changed files with 1 additions and 1 deletions
|
@ -362,7 +362,7 @@ void dumpBatteryDefend() {
|
|||
|
||||
for (auto &file : files) {
|
||||
fileLocation = std::string(config[1]) + std::string(file);
|
||||
if (!android::base::ReadFileToString(fileLocation, &content)) {
|
||||
if (!android::base::ReadFileToString(fileLocation, &content) || content.empty()) {
|
||||
content = "\n";
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue