From 16b0a5948a9ea2b224660559edfc7396dee90982 Mon Sep 17 00:00:00 2001 From: Alexis Lopez Zubieta Date: Sun, 4 Nov 2018 18:10:00 -0600 Subject: [PATCH] createLinksInAppDirRoot is capable of dealing with an empty customAppRunPath so there is no need to check it --- src/linuxdeploy.cpp | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/linuxdeploy.cpp b/src/linuxdeploy.cpp index 9d135d7..5a3bdef 100644 --- a/src/linuxdeploy.cpp +++ b/src/linuxdeploy.cpp @@ -26,25 +26,15 @@ namespace linuxdeploy { try { desktopfile::DesktopFile desktopFile = getMainDesktopFile(desktopFilePaths, deployedDesktopFiles); - ldLog() << "Deploying desktop file:" << desktopFile.path() << std::endl; + if (!appDir.createLinksInAppDirRoot(desktopFile, customAppRunPath)) + return -1; - bool rv; - - if (!customAppRunPath.empty()) { - rv = appDir.createLinksInAppDirRoot(desktopFile, customAppRunPath); - } else { - rv = appDir.createLinksInAppDirRoot(desktopFile); - } - - if (!rv) { - return 1; - } } catch (const std::runtime_error& er) { return -1; } - - return true; + + return 1; } desktopfile::DesktopFile getMainDesktopFile(std::vector& desktopFilePaths,