Skip to content

Commit

Permalink
[contour] Fixes failing startup due to background_image.path pointi…
Browse files Browse the repository at this point in the history
…ng to a non-existing file (#928).
  • Loading branch information
christianparpart committed Dec 21, 2022
1 parent 7f9a489 commit e2dccc3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
<ul>
<li>Fixes statusline clock to show the correct local time.</li>
<li>Fixes running within OpenGL/ES context.</li>
<li>Fixes failing startup due to `background_image.path` pointing to a non-existing file (#928).</li>
</ul>
</description>
</release>
Expand Down
6 changes: 6 additions & 0 deletions src/contour/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ namespace
{
auto const resolvedFileName = homeResolvedPath(fileName, Process::homeDirectory());

if (!FileSystem::exists(resolvedFileName))
{
errorlog()("Background image path not found: {}", resolvedFileName.string());
return nullptr;
}

auto backgroundImage = terminal::BackgroundImage {};
backgroundImage.location = resolvedFileName;
backgroundImage.hash = crispy::StrongHash::compute(resolvedFileName.string());
Expand Down

0 comments on commit e2dccc3

Please sign in to comment.