/* check the file exits actually */
exist = open(origin_path, O_RDONLY);
if (exist < 0) {
- thumb_err("Fail to open original_path[%s]", origin_path);
- if (errno == EACCES || errno == EPERM)
+ if (errno == EACCES || errno == EPERM) {
+ thumb_err("Fail to open original_path[%s]: Permission Denied", origin_path);
return MS_MEDIA_ERR_PERMISSION_DENIED;
- else
+ } else {
+ thumb_err("Fail to open original_path[%s]: Invalid Path", origin_path);
return MS_MEDIA_ERR_INVALID_PARAMETER;
+ }
}
close(exist);