From 5ff02ea6b074b3d68efec48821bce65d8b51f503 Mon Sep 17 00:00:00 2001 From: Junghyun Yeon Date: Tue, 13 Jun 2017 18:35:49 +0900 Subject: [PATCH] Add condition for external installed pkgs - Skip making bin directories when dest directory is symlink Change-Id: Iebb3df57b62d5239ec43b5db7c365dfa815de1f2 Signed-off-by: Junghyun Yeon --- src/tpk/step/filesystem/step_create_symbolic_link.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tpk/step/filesystem/step_create_symbolic_link.cc b/src/tpk/step/filesystem/step_create_symbolic_link.cc index fd29a12..4a2f6b0 100644 --- a/src/tpk/step/filesystem/step_create_symbolic_link.cc +++ b/src/tpk/step/filesystem/step_create_symbolic_link.cc @@ -29,7 +29,8 @@ bool CreateSymLink(application_x* app, InstallerContext* context) { bf::path bindir = context->pkg_path.get() / bf::path("bin"); LOG(DEBUG) << "Creating dir: " << bindir; - if (!common_installer::CreateDir(bindir)) { + if (!bf::is_symlink(symlink_status(bindir)) && + !common_installer::CreateDir(bindir)) { LOG(ERROR) << "Directory creation failure: " << bindir; return false; } -- 2.7.4