Fixed failed to uninstall preload webapp. (part2)
authorHoseon LEE <hoseon46.lee@samsung.com>
Mon, 29 Apr 2013 17:21:48 +0000 (02:21 +0900)
committerJihoon Chung <jihoon.chung@samsung.com>
Tue, 30 Apr 2013 04:43:01 +0000 (13:43 +0900)
[Issue#] N/A
[Problem] Manifest.xml is not removed.
[Cause] The path of manifest.xml was wrong.
[Solution] Add removing the manifest.xml
[SCMRequest] N/A

Change-Id: I1dc4b930a6281559131476862261a8218aae4d81

src/jobs/widget_uninstall/task_remove_files.cpp [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 2cd9538..709b4a5
@@ -113,7 +113,14 @@ void TaskRemoveFiles::StepRemoveManifest()
     std::ostringstream manifest_name;
     manifest_name << m_context.tzPkgid << ".xml";
     std::ostringstream destFile;
-    destFile << "/opt/share/packages" << "/"; //TODO constant with path
+    const std::string PRELOAD_INSTALLED_PATH = "/usr/apps";
+    if (0 == (m_context.installedPath).compare(0, PRELOAD_INSTALLED_PATH.length(),
+                PRELOAD_INSTALLED_PATH)) {
+        LogDebug("This widget is prealoded.");
+        destFile << "/usr/share/packages" << "/"; //TODO constant with path
+    } else {
+        destFile << "/opt/share/packages" << "/"; //TODO constant with path
+    }
     destFile << manifest_name.str();
     int ret1 = pkgmgr_parser_parse_manifest_for_uninstallation(
             destFile.str().c_str(), NULL);