Merge "[2.2.1][P130807-00904] Fail to get the host of the uri which has only ? charac...
[platform/framework/native/appfw.git] / src / io / FIo_DirectoryImpl.cpp
index 3f44ee4..28b8969 100644 (file)
@@ -1,5 +1,4 @@
 //
-// Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Apache License, Version 2.0 (the License);
@@ -92,7 +91,7 @@ _DirectoryImpl::Construct(const String& dirPath)
        if (__pDir == null)
        {
                r = _NativeError::ConvertNativeErrorToResult(errno, true);
-               SysLog(NID_IO, "[%s] Failed to open directory (%s).", GetErrorMessage(r), pDirPath.get());
+               SysSecureLogException(NID_IO, r, "[%s] Failed to open directory (%s).", GetErrorMessage(r), pDirPath.get());
                goto CATCH;
        }
 
@@ -101,7 +100,6 @@ _DirectoryImpl::Construct(const String& dirPath)
        return E_SUCCESS;
 
 CATCH:
-
        return r;
 }
 
@@ -452,11 +450,10 @@ _DirectoryImpl::RemoveRecursively(char* pDirPath)
                strcpy(absPath, pDirPath);
                strcat(absPath, "/");
                strcat(absPath, dirEnt.d_name);
-               //SysLog(NID_IO, "entry name: %s", absPath);
 
-               struct stat statbuf;
-               memset(&statbuf, 0, sizeof(struct stat));
-               if (lstat(absPath, &statbuf) == -1)
+               struct stat64 statbuf;
+               memset(&statbuf, 0, sizeof(struct stat64));
+               if (lstat64(absPath, &statbuf) == -1)
                {
                        r = _NativeError::ConvertNativeErrorToResult(errno, true);
                        SysLog(NID_IO, "[%s] Failed to get file status. errno: %d (%s)",
@@ -465,7 +462,7 @@ _DirectoryImpl::RemoveRecursively(char* pDirPath)
                }
                if (!S_ISLNK(statbuf.st_mode))
                {
-                       if (stat(absPath, &statbuf) < 0)
+                       if (stat64(absPath, &statbuf) < 0)
                        {
                                r = _NativeError::ConvertNativeErrorToResult(errno, true);
                                SysLog(NID_IO, "[%s] Failed to get file status. errno: %d (%s)",