From: Jan Olszak Date: Tue, 20 Nov 2012 07:07:08 +0000 (+0100) Subject: [Prevent] Handle return value. X-Git-Tag: submit/trunk/20121123.030436~3^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=085eaf521fba10cacefe758a44d5b69f12c5f0e1;p=platform%2Fframework%2Fweb%2Fwrt-installer.git [Prevent] Handle return value. [Issue#] Unhandled return value. [Bug] N/A [Cause] N/A [Solution] Logging on error. [Verification] Build installer Change-Id: Ic2609d79d9c82039e94a899fccec5539712fe1c9 --- diff --git a/src/jobs/widget_install/task_database.cpp b/src/jobs/widget_install/task_database.cpp index 450de41..3054c08 100644 --- a/src/jobs/widget_install/task_database.cpp +++ b/src/jobs/widget_install/task_database.cpp @@ -35,6 +35,8 @@ #include #include #include +#include +#include using namespace WrtDB; diff --git a/src/jobs/widget_uninstall/task_remove_files.cpp b/src/jobs/widget_uninstall/task_remove_files.cpp index 2dfe92e..7a8f66b 100644 --- a/src/jobs/widget_uninstall/task_remove_files.cpp +++ b/src/jobs/widget_uninstall/task_remove_files.cpp @@ -29,6 +29,8 @@ #include #include #include +#include +#include namespace Jobs { namespace WidgetUninstall { @@ -138,7 +140,10 @@ void TaskRemoveFiles::StepRemoveExternalLocations() if(WrtUtilFileExists(*path)) { LogDebug(" -> " << *path); - remove(path->c_str()); + int ret = remove(path->c_str()); + if (ret != 0) { + LogDebug("Failed to remove the file: " << path->c_str() << " with error: " << strerror(errno)); + } } else if(WrtUtilDirExists(*path)) {