summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjiyong.min <jiyong.min@samsung.com>2019-01-10 04:50:48 (GMT)
committerjiyong.min <jiyong.min@samsung.com>2019-01-10 04:50:48 (GMT)
commit999270f230ab4631ee92049d5f67cc24b0277403 (patch)
tree2c83d4c5656e69ad53931ca225b84cd621e3e87a
parentfccddb616688f39af581aaaffc964aab5efa0af4 (diff)
downloadlibmedia-thumbnail-999270f230ab4631ee92049d5f67cc24b0277403.zip
libmedia-thumbnail-999270f230ab4631ee92049d5f67cc24b0277403.tar.gz
libmedia-thumbnail-999270f230ab4631ee92049d5f67cc24b0277403.tar.bz2
Fix the log position to avoid errno change for thumbnail_util_extract().submit/tizen/20190109.233706accepted/tizen/unified/20190111.055148refs/changes/56/197156/1
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 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);