/* check the file exits actually */
exist = open(path, O_RDONLY);
if (exist < 0) {
- media_content_sec_debug("path [%s]", path);
- media_content_stderror("open file fail");
- if (errno == EACCES || errno == EPERM)
+ if (errno == EACCES || errno == EPERM) {
+ media_content_stderror("open file fail");
+ media_content_sec_debug("path [%s]", path);
return MEDIA_CONTENT_ERROR_PERMISSION_DENIED;
- else
+ } else {
+ media_content_stderror("open file fail");
+ media_content_sec_debug("path [%s]", path);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+ }
}
close(exist);