Fix StepCreateStorageDirectores 99/98199/2
authorPiotr Ganicz <p.ganicz@samsung.com>
Tue, 15 Nov 2016 08:02:01 +0000 (09:02 +0100)
committerjongmyeong ko <jongmyeong.ko@samsung.com>
Thu, 17 Nov 2016 14:02:15 +0000 (06:02 -0800)
This patch provides proper handling for following test case:
1. Crash installation before StepGenerateXML
2. Install again
3. The installation should be successful

Change-Id: Ic55d86d5164ecb1f596f7ddc7d51cf16a0f6268e

src/wgt/step/filesystem/step_create_symbolic_link.cc

index cbdbb7f..a814f04 100644 (file)
@@ -42,6 +42,8 @@ bool StepCreateSymbolicLink::CreateSymlinksForApps() {
     common_installer::CreateDir(exec_path);
 
     exec_path /= bf::path(app->appid);
+    if (bf::exists(exec_path))
+      bf::remove_all(exec_path);
 
     if (strcmp(app->component_type, "uiapp") == 0) {
       bf::create_symlink(bf::path(WRT_LAUNCHER), exec_path, error);