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)