fixes
This commit is contained in:
parent
35f045f393
commit
4f6f5e6724
3 changed files with 5 additions and 4 deletions
|
@ -36,6 +36,7 @@ namespace os {
|
|||
return config.weather.getWeatherInfo();
|
||||
});
|
||||
|
||||
// TODO: make this use the user's timezone
|
||||
this->date = std::format("{:%B %d}", year_month_day { floor<days>(system_clock::now()) });
|
||||
this->host = hostFut.get();
|
||||
this->kernelVersion = kernelFut.get();
|
||||
|
|
|
@ -196,7 +196,7 @@ namespace {
|
|||
|
||||
content.push_back(separator() | color(ui::DEFAULT_THEME.border));
|
||||
|
||||
if (data.host)
|
||||
if (data.host && !data.host->empty())
|
||||
content.push_back(createRow(hostIcon, "Host", *data.host));
|
||||
else
|
||||
error_at(data.host.error());
|
||||
|
|
|
@ -424,7 +424,7 @@ namespace os {
|
|||
DracError(DracErrorCode::NotFound, std::format("Failed to open DMI product identifier file '{}'", path))
|
||||
);
|
||||
|
||||
if (!std::getline(file, line))
|
||||
if (!std::getline(file, line) || line.empty())
|
||||
return Err(
|
||||
DracError(DracErrorCode::ParseError, std::format("DMI product identifier file ('{}') is empty", path))
|
||||
);
|
||||
|
@ -478,12 +478,12 @@ namespace os {
|
|||
if (Result<u64, DracError> linuxCount = linux::GetTotalPackageCount())
|
||||
count += *linuxCount;
|
||||
else
|
||||
return Err(linuxCount.error());
|
||||
debug_at(linuxCount.error());
|
||||
|
||||
if (Result<u64, DracError> sharedCount = shared::GetPackageCount())
|
||||
count += *sharedCount;
|
||||
else
|
||||
return Err(sharedCount.error());
|
||||
debug_at(sharedCount.error());
|
||||
|
||||
return count;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue