Fix exception handling 79/224179/1
authorMinje Ahn <minje.ahn@samsung.com>
Fri, 7 Feb 2020 02:42:19 +0000 (11:42 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Fri, 7 Feb 2020 02:42:19 +0000 (11:42 +0900)
Change-Id: I224474f434477a551a2c909eddb52112b57e62db
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
src/common/media-svc-util.c

index bd5502b..1aa74d4 100644 (file)
@@ -1312,10 +1312,9 @@ int _media_svc_extract_media_metadata(sqlite3 *handle, bool is_direct, media_svc
                                mmf_error = mm_file_get_attrs(tag, MM_FILE_TAG_ARTWORK_MIME, &p, &artwork_mime_size, NULL);
                                if ((mmf_error == FILEINFO_ERROR_NONE) && (artwork_mime_size > 0)) {
                                        ret = _media_svc_get_thumbnail_path(content_info->media_type, thumb_path, content_info->path, p, uid);
-                                       if (ret != MS_MEDIA_ERR_NONE)
+                                       if (ret != MS_MEDIA_ERR_NONE) {
                                                media_svc_error("Fail to Get Thumbnail Path");
-
-                                       if (strlen(thumb_path) > 0) {
+                                       } else {
                                                ret = __media_svc_save_image(image, size, thumb_path, uid);
                                                if (ret != MS_MEDIA_ERR_NONE) {
                                                        media_svc_error("Fail to Save Image");