#endif
dp = opendir(path);
if (dp == NULL) {
- media_content_sec_error("path [%s]", path);
- media_content_stderror("open dir fail");
-
- if (errno == EACCES || errno == EPERM)
+ if (errno == EACCES || errno == EPERM) {
+ media_content_stderror("open dir fail");
+ media_content_sec_error("path [%s]", path);
return MEDIA_CONTENT_ERROR_PERMISSION_DENIED;
- else
+ } else {
+ media_content_stderror("open dir fail");
+ media_content_sec_error("path [%s]", path);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+ }
}
closedir(dp);