Show warning if existing AppRun is overwritten

This commit is contained in:
TheAssassin 2018-11-06 15:39:35 +01:00
parent 9d25fee1dc
commit 4e33e395de

View File

@ -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();
}