Fix the log position to avoid errno change for thumbnail_util_extract(). 56/197156/1 accepted/tizen/unified/20190111.055148 submit/tizen/20190109.233706
authorjiyong.min <jiyong.min@samsung.com>
Thu, 10 Jan 2019 04:50:48 +0000 (13:50 +0900)
committerjiyong.min <jiyong.min@samsung.com>
Thu, 10 Jan 2019 04:50:48 +0000 (13:50 +0900)
Change-Id: I8b0559f9ebfedbe208ee228a7611b3eabb2d8a9c

src/media-thumbnail.c

index 9a3b02a..be1b09a 100755 (executable)
@@ -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);