Fix Prevent Issue
authorDuyoung Jang <duyoung.jang@samsung.com>
Thu, 24 Oct 2013 06:03:20 +0000 (15:03 +0900)
committerDuyoung Jang <duyoung.jang@samsung.com>
Thu, 24 Oct 2013 06:03:20 +0000 (15:03 +0900)
Change-Id: I4a7b4d465100aca2e068119b043fb030b15a4338
Signed-off-by: Duyoung Jang <duyoung.jang@samsung.com>
src/app/FApp_AppInfo.cpp
src/app/inc/FApp_AppInfo.h

index 61cbd24..b83a027 100644 (file)
@@ -99,6 +99,7 @@ _AppInfo::_AppInfo(void)
        : __appState(TERMINATED)
        , __appType(_APP_TYPE_NONE)
        , __appRootDirFd(-1)
+       , __appSdDirFd(-1)
        , __appHandlerType(_APP_HANDLER_NONE)
        , __parentWindowHandle(-1)
        , __pAppName(null)
@@ -120,6 +121,7 @@ _AppInfo::~_AppInfo(void)
 
        // closing may or may not succeed
        close(__appRootDirFd);
+       close(__appSdDirFd);
 }
 
 _AppInfo*
@@ -182,8 +184,8 @@ _AppInfo::Construct(void)
                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);
+               __appSdDirFd = open(sdInfoPath, O_RDONLY);
+               SysLog(NID_APP, "sd root directory (%s:%d) open.", sdInfoPath, __appSdDirFd);
 
                char apiVersion[MAX_APIVERSION] = {0, };
                char* pRet = fgets(apiVersion, MAX_APIVERSION - 1, pFile);
index 48bfd3b..2916c44 100644 (file)
@@ -231,6 +231,7 @@ private:
        AppState __appState;
        int __appType;
        int __appRootDirFd;
+       int __appSdDirFd;
        int __appHandlerType;
        int __parentWindowHandle;
        Tizen::Base::String __appRootPath;