From 999270f230ab4631ee92049d5f67cc24b0277403 Mon Sep 17 00:00:00 2001 From: "jiyong.min" Date: Thu, 10 Jan 2019 13:50:48 +0900 Subject: Fix the log position to avoid errno change for thumbnail_util_extract(). Change-Id: I8b0559f9ebfedbe208ee228a7611b3eabb2d8a9c --- src/media-thumbnail.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/media-thumbnail.c b/src/media-thumbnail.c index 9a3b02a..be1b09a 100755 --- a/src/media-thumbnail.c +++ b/src/media-thumbnail.c @@ -83,11 +83,13 @@ int thumbnail_request_extract_raw_data_async(int request_id, const char *origin_ /* 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); -- cgit v1.2.3