From: dahyeong.kim Date: Mon, 29 Jul 2013 11:24:26 +0000 (+0000) Subject: Merge "[2.2.1] Merge different codes between 2.2 and 3.0" into tizen_2.2 X-Git-Tag: submit/tizen/20131210.080830^2^2~216 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c05680cb2cc86454691eaf1499ce8bec20b92d3e;hp=8f5f7c07039d34a2f4ccb9836ace7f7e0d54d08a;p=platform%2Fframework%2Fnative%2Fappfw.git Merge "[2.2.1] Merge different codes between 2.2 and 3.0" into tizen_2.2 --- diff --git a/src/io/FIo_DirEnumeratorImpl.cpp b/src/io/FIo_DirEnumeratorImpl.cpp index 771bc6c..1d39563 100644 --- a/src/io/FIo_DirEnumeratorImpl.cpp +++ b/src/io/FIo_DirEnumeratorImpl.cpp @@ -51,7 +51,7 @@ _DirEnumeratorImpl::_DirEnumeratorImpl(const String& dirPath) , __pCurDirEntry(null) { __validAccess = true; - __absoluteDirPath = dirPath; + __dirPath = dirPath; } _DirEnumeratorImpl::_DirEnumeratorImpl(const _DirEnumeratorImpl& dirEnumeratorImpl) @@ -116,11 +116,11 @@ _DirEnumeratorImpl::MoveNext(void) { SysTryReturnResult(NID_IO, __validAccess == true, E_ILLEGAL_ACCESS, "Given path cannot be accessed!"); - SysTryReturnResult(NID_IO, __absoluteDirPath.GetLength() > 0 && __absoluteDirPath.GetLength() <= PATH_MAX, + SysTryReturnResult(NID_IO, __dirPath.GetLength() > 0 && __dirPath.GetLength() <= PATH_MAX, E_INVALID_ARG, "Invalid argument was passed. Given pattern length is not correct!"); result r = E_SUCCESS; - unique_ptr pDirPath(_StringConverter::CopyToCharArrayN(String(__absoluteDirPath))); + unique_ptr pDirPath(_StringConverter::CopyToCharArrayN(String(__dirPath))); SysTryReturn(NID_IO, pDirPath != null, GetLastResult(), GetLastResult(), "[%s] Invalid argument was passed. Given pattern length is not correct!", GetErrorMessage(GetLastResult())); @@ -148,7 +148,10 @@ _DirEnumeratorImpl::MoveNext(void) memset(pEntryPath.get(), 0, len); strcpy(pEntryPath.get(), pDirPath.get()); - strncat(pEntryPath.get(), "/", 1); + if (__dirPath.EndsWith(L"/") == false) + { + strncat(pEntryPath.get(), "/", 1); + } strncat(pEntryPath.get(), pDirEnt->d_name, strlen(pDirEnt->d_name)); struct stat64 statbuf; @@ -200,7 +203,7 @@ _DirEnumeratorImpl::Reset(void) closedir(static_cast (__pFileFindInfo)); } - unique_ptr pDirPathName(_StringConverter::CopyToCharArrayN(__absoluteDirPath)); + unique_ptr pDirPathName(_StringConverter::CopyToCharArrayN(__dirPath)); SysTryReturn(NID_IO, pDirPathName != null, GetLastResult(), GetLastResult(), "[%s] Failed to close file.", GetErrorMessage(GetLastResult())); diff --git a/src/io/inc/FIo_DirEnumeratorImpl.h b/src/io/inc/FIo_DirEnumeratorImpl.h index 3a96cd5..ade3453 100644 --- a/src/io/inc/FIo_DirEnumeratorImpl.h +++ b/src/io/inc/FIo_DirEnumeratorImpl.h @@ -67,7 +67,7 @@ private: _DirEnumeratorImpl& operator =(const _DirEnumeratorImpl& source); bool __validAccess; - Tizen::Base::String __absoluteDirPath; + Tizen::Base::String __dirPath; void* __pFileFindInfo; DirEntry* __pCurDirEntry; diff --git a/src/system/FSys_SettingInfoImpl.cpp b/src/system/FSys_SettingInfoImpl.cpp index 26cec35..d131e3f 100644 --- a/src/system/FSys_SettingInfoImpl.cpp +++ b/src/system/FSys_SettingInfoImpl.cpp @@ -88,6 +88,7 @@ _SettingInfoImpl::InitSettingClient(void) { if(pSettingClient == null && pSettingClientEx == null) { +/* if(File::IsFileExist(_COMMON_SERVICE_ENABLED) == false) { if(pSettingClient == null) @@ -96,6 +97,7 @@ _SettingInfoImpl::InitSettingClient(void) } } else +*/ { common_mode = true; if(pSettingClientEx == null)