Modify AppInfo API for sdcard
authorDuyoung Jang <duyoung.jang@samsung.com>
Wed, 2 Oct 2013 08:59:32 +0000 (17:59 +0900)
committerDuyoung Jang <duyoung.jang@samsung.com>
Wed, 2 Oct 2013 08:59:32 +0000 (17:59 +0900)
Change-Id: I9a579bc74e43f7be8c1afe9c35ce181bc808082a
Signed-off-by: Duyoung Jang <duyoung.jang@samsung.com>
src/app/FApp_AppInfo.cpp [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 8cec93c..e74a86b
@@ -177,6 +177,14 @@ _AppInfo::Construct(void)
                pFile = fdopen(fd, "r");
                SysTryCatch(NID_APP, pFile != NULL, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Opening appinfo file (%s) failed : %s.", appInfoPath, strerror(errno));
 
+               // sdcard
+               char sdInfoPath[PATH_MAX] = {0, };
+               strncpy(sdInfoPath, "/opt/storage/sdcard/app2sd/", strlen("/opt/storage/sdcard/app2sd/"));
+               strncat(sdInfoPath, pPackageId, MAX_APPID);
+
+               int sdFd = open(sdInfoPath, O_RDONLY);
+               SysLog(NID_APP, "sd root directory (%s:%d) open.", sdInfoPath, sdFd);
+
                char apiVersion[MAX_APIVERSION] = {0, };
                char* pRet = fgets(apiVersion, MAX_APIVERSION - 1, pFile);
                SysTryCatch(NID_APP, pRet != NULL, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Reading appinfo file (%s) failed : %s.", appInfoPath, strerror(errno));