From 93fea697e5082018e7f8c2f9457f9ecd13dcddbc Mon Sep 17 00:00:00 2001 From: Alexis Lopez Zubieta Date: Sun, 4 Nov 2018 17:42:11 -0600 Subject: [PATCH] Move desktop file deployment away from desktop file lookup --- src/linuxdeploy.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/linuxdeploy.cpp b/src/linuxdeploy.cpp index 15b13e3..f0b7bba 100644 --- a/src/linuxdeploy.cpp +++ b/src/linuxdeploy.cpp @@ -61,19 +61,20 @@ namespace linuxdeploy { << desktopFile.path() << std::endl; } - ldLog() << "Deploying desktop file:" << desktopFile.path() << std::endl; + } - bool rv; + ldLog() << "Deploying desktop file:" << desktopFile.path() << std::endl; - if (!customAppRunPath.empty()) { - rv = appDir.createLinksInAppDirRoot(desktopFile, customAppRunPath); - } else { - rv = appDir.createLinksInAppDirRoot(desktopFile); - } + bool rv; - if (!rv) { - return 1; - } + if (!customAppRunPath.empty()) { + rv = appDir.createLinksInAppDirRoot(desktopFile, customAppRunPath); + } else { + rv = appDir.createLinksInAppDirRoot(desktopFile); + } + + if (!rv) { + return 1; } } return true;