ecs: wrap sdb command and path with double quotes
authorChulHo Song <ch81.song@samsung.com>
Tue, 8 Sep 2015 10:53:19 +0000 (19:53 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Wed, 9 Sep 2015 02:14:55 +0000 (11:14 +0900)
Change-Id: I7c580e211cd7dd5f5edf012ea289f24c4d1ea474
Signed-off-by: ChulHo Song <ch81.song@samsung.com>
tizen/src/ecs/ecs_msg_injector.c

index 587a3ed0e000a2f468126353350e2b73269ea23e..efb93fb93c7f9cb3492ed48602916c652855d494 100644 (file)
@@ -452,8 +452,11 @@ static bool push_package(const char* data)
     memset(cmd, 0, sizeof(cmd));
 
     char* addon = strtok((char*)data, token);
-
-    ret = sprintf(cmd, "%s%s -s emulator-%d push %s%s%s%s%s /opt/usr/apps/tmp/sdk_tools/%s 2>&1",
+#ifndef CONFIG_WIN32
+    ret = sprintf(cmd, "\"%s%s\" -s emulator-%d push \"%s%s%s%s%s\" /opt/usr/apps/tmp/sdk_tools/%s 2>&1",
+#else
+    ret = sprintf(cmd, "cmd /S /C \"\"%s%s\" -s emulator-%d push \"%s%s%s%s%s\" /opt/usr/apps/tmp/sdk_tools/%s 2>&1\"",
+#endif
             bin_dir, sdb_path, get_device_serial_number(),
             bin_dir, platform_path, get_profile_name(), addon_path, addon,
             addon);