diff options
author | jiyong.min <jiyong.min@samsung.com> | 2019-01-10 13:50:48 +0900 |
---|---|---|
committer | Jiyong Min <jiyong.min@samsung.com> | 2019-01-10 04:52:07 +0000 |
commit | 99a0c3882585a229cb15497cedeefcd776ffeb7b (patch) | |
tree | be83e6b7824428f2cc493a6e308099ab845ea3f4 | |
parent | d0f5e3f7255b7647635bbc9ac1ff8216dea3f0b7 (diff) | |
download | libmedia-thumbnail-99a0c3882585a229cb15497cedeefcd776ffeb7b.tar.gz libmedia-thumbnail-99a0c3882585a229cb15497cedeefcd776ffeb7b.tar.bz2 libmedia-thumbnail-99a0c3882585a229cb15497cedeefcd776ffeb7b.zip |
Fix the log position to avoid errno change for thumbnail_util_extract().
Change-Id: I8b0559f9ebfedbe208ee228a7611b3eabb2d8a9c
-rwxr-xr-x | src/media-thumbnail.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/media-thumbnail.c b/src/media-thumbnail.c index 690a4d1..7993647 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); |