From: Zbigniew Kostrzewa Date: Fri, 20 Sep 2013 05:43:20 +0000 (+0200) Subject: Fix Prevent issue. Reduce number of Ignored issues. X-Git-Tag: submit/tizen_2.2/20130927.091100^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6ee9ab91d530cdadeaf2d866c6493181ffde24be;p=platform%2Fframework%2Fweb%2Fwrt-commons.git Fix Prevent issue. Reduce number of Ignored issues. [Issue#] CID: 12114 [Problem] Return value not checked [Cause] Function returns a value which is not checked [Solution] Check the returned value and log error if one occurred [Verification] Build repository Change-Id: If7c8ef9f8c7682830efa741a9d814438bb7ebe2d --- diff --git a/modules/core/src/scoped_dir.cpp b/modules/core/src/scoped_dir.cpp index 2639f7a..96550e6 100644 --- a/modules/core/src/scoped_dir.cpp +++ b/modules/core/src/scoped_dir.cpp @@ -20,6 +20,7 @@ * @brief This file is the implementation scoped directory */ #include +#include #include #include @@ -98,7 +99,12 @@ ScopedDir::ScopedDir(const std::string & str, mode_t mode) : BaseType(str) { if(!str.empty()) { - mkdir(str.c_str(), mode); + if (mkdir(str.c_str(), mode) == -1) + { + std::string errstr = DPL::GetErrnoString(); + LogError("Error while creating directory: " << str + << " [" << errstr << "]"); + } } }