Fixed resource symbolic link for prealod app.
authorSoyoung Kim <sy037.kim@samsung.com>
Tue, 18 Jun 2013 12:25:19 +0000 (21:25 +0900)
committerSoyoung Kim <sy037.kim@samsung.com>
Wed, 19 Jun 2013 06:25:19 +0000 (15:25 +0900)
[Issue#] P130614-0991
[Problem] show wrong alarm icon at schedule memo app.
[Cause] wrong symbolic link for service app.
[Solution] change symbolic link at resource directory.
[SCMRequest] N/A

Change-Id: I2a517a5e544211a18319e6892870a5349957e7c9

src/jobs/widget_install/task_file_manipulation.cpp

index a338ce8..c3c7123 100644 (file)
@@ -252,17 +252,16 @@ void TaskFileManipulation::StepRenamePath()
 void TaskFileManipulation::StepLinkForPreload()
 {
     if (m_context.mode.rootPath == InstallMode::RootPath::RO) {
-        std::string srcDir = m_context.locations->getUserDataRootDir() +
-            WrtDB::GlobalConfig::GetWidgetSrcPath();
+        std::string optRes = m_context.locations->getUserDataRootDir() +
+            WrtDB::GlobalConfig::GetWidgetResPath();
+        std::string usrRes = m_context.locations->getPackageInstallationDir() +
+            WrtDB::GlobalConfig::GetWidgetResPath();
 
-        if (0 != access(srcDir.c_str(), F_OK)) {
+        if (0 != access(optRes.c_str(), F_OK)) {
             LogDebug("Make symbolic name for preaload app" <<
-                    m_context.locations->getSourceDir() << " to " << srcDir);
-            std::string resDir = m_context.locations->getUserDataRootDir() +
-                "/res";
+                    usrRes << " to " << optRes);
 
-            WrtUtilMakeDir(resDir);
-            if (symlink(m_context.locations->getSourceDir().c_str(), srcDir.c_str()) != 0)
+            if (symlink(usrRes.c_str(), optRes.c_str()) != 0)
             {
                 int error = errno;
                 if (error)