From 4e33e395de826852e3f042c18b53bbcb2116bd0b Mon Sep 17 00:00:00 2001 From: TheAssassin Date: Tue, 6 Nov 2018 15:39:35 +0100 Subject: [PATCH] Show warning if existing AppRun is overwritten --- src/core.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core.cpp b/src/core.cpp index d834e6b..9ea74d9 100644 --- a/src/core.cpp +++ b/src/core.cpp @@ -59,6 +59,13 @@ namespace linuxdeploy { if (!customAppRunPath.empty()) { ldLog() << LD_INFO << "Deploying custom AppRun: " << customAppRunPath << std::endl; + + const auto& appRunPathInAppDir = appDir.path() / "AppRun"; + if (bf::exists(appRunPathInAppDir)) { + ldLog() << LD_WARNING << "File exists, replacing with custom AppRun" << std::endl; + bf::remove(appRunPathInAppDir); + } + appDir.deployFile(customAppRunPath, appDir.path() / "AppRun"); appDir.executeDeferredOperations(); }