From: Richard Huang Date: Tue, 12 May 2020 15:07:41 +0000 (+0100) Subject: Suppress unnecessary error output while creating system cache directory X-Git-Tag: dali_1.5.13~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0990dc7fd3da818a61bdcabda0db6fd0546fbd28;p=platform%2Fcore%2Fuifw%2Fdali-adaptor-legacy.git Suppress unnecessary error output while creating system cache directory Change-Id: Iaf8e312bcd04567dea4d79b8a5d3d828c3301fa8 --- diff --git a/dali/internal/adaptor/common/adaptor-impl.cpp b/dali/internal/adaptor/common/adaptor-impl.cpp index 1b56e54..737845d 100755 --- a/dali/internal/adaptor/common/adaptor-impl.cpp +++ b/dali/internal/adaptor/common/adaptor-impl.cpp @@ -20,6 +20,8 @@ #include // EXTERNAL INCLUDES +#include +#include #include #include #include @@ -300,11 +302,11 @@ void Adaptor::Initialize( GraphicsFactory& graphicsFactory, Dali::Configuration: std::string systemCachePath = GetSystemCachePath(); if( ! systemCachePath.empty() ) { - const int dir_err = system( std::string( "mkdir " + systemCachePath ).c_str() ); - if (-1 == dir_err) + const int dir_err = mkdir( systemCachePath.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH ); + if ( 0 != dir_err && errno != EEXIST ) { - printf( "Error creating system cache directory: %s!\n", systemCachePath.c_str() ); - exit(1); + DALI_LOG_ERROR( "Error creating system cache directory: %s!\n", systemCachePath.c_str() ); + exit( 1 ); } }