summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjiyong.min <jiyong.min@samsung.com>2019-01-10 13:50:48 +0900
committerJiyong Min <jiyong.min@samsung.com>2019-01-10 04:52:07 +0000
commit99a0c3882585a229cb15497cedeefcd776ffeb7b (patch)
treebe83e6b7824428f2cc493a6e308099ab845ea3f4
parentd0f5e3f7255b7647635bbc9ac1ff8216dea3f0b7 (diff)
downloadlibmedia-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-xsrc/media-thumbnail.c8
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);