From 47295b7a2aec75e4e4f8a514dcd4ade51f00451c Mon Sep 17 00:00:00 2001 From: TheAssassin Date: Mon, 18 Jun 2018 04:19:22 +0200 Subject: [PATCH] Return error if icon can't be found --- src/core/appdir.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/core/appdir.cpp b/src/core/appdir.cpp index a966ed4..de6a091 100644 --- a/src/core/appdir.cpp +++ b/src/core/appdir.cpp @@ -531,6 +531,8 @@ namespace linuxdeploy { return false; } + bool iconDeployed = false; + const auto foundIconPaths = deployedIconPaths(); if (foundIconPaths.empty()) { @@ -548,9 +550,17 @@ namespace linuxdeploy { ldLog() << LD_ERROR << "Failed to create symlink for icon in AppDir root:" << iconPath << std::endl; return false; } + + iconDeployed = true; + break; } } + if (!iconDeployed) { + ldLog() << LD_ERROR << "Could not find suitable icon for Icon entry:" << iconName << std::endl; + return false; + } + if (!customAppRunPath.empty()) { // copy custom AppRun executable // FIXME: make sure this file is executable