summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinje Ahn <minje.ahn@samsung.com>2017-08-17 08:17:26 (GMT)
committerMinje Ahn <minje.ahn@samsung.com>2017-08-17 08:17:26 (GMT)
commit6b535fe0b47301c5883d90828cf78ce98108fa13 (patch)
treee650d67c09f840f552cf3be1b653b0bb6c78dd59
parent51faec4d848b9cd7a5d53a61899942e44749ef7e (diff)
downloadlibmedia-thumbnail-6b535fe0b47301c5883d90828cf78ce98108fa13.zip
libmedia-thumbnail-6b535fe0b47301c5883d90828cf78ce98108fa13.tar.gz
libmedia-thumbnail-6b535fe0b47301c5883d90828cf78ce98108fa13.tar.bz2
Change-Id: Idad1a8ca2ca97a3cb5b53fe23133152502f734bb Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
-rw-r--r--packaging/libmedia-thumbnail.spec2
-rwxr-xr-xsrc/media-thumb-internal.c20
2 files changed, 8 insertions, 14 deletions
diff --git a/packaging/libmedia-thumbnail.spec b/packaging/libmedia-thumbnail.spec
index 6e1cff1..434708a 100644
--- a/packaging/libmedia-thumbnail.spec
+++ b/packaging/libmedia-thumbnail.spec
@@ -1,6 +1,6 @@
Name: libmedia-thumbnail
Summary: Media thumbnail service library for multimedia applications
-Version: 0.2.14
+Version: 0.2.15
Release: 0
Group: Multimedia/Libraries
License: Apache-2.0 and PD
diff --git a/src/media-thumb-internal.c b/src/media-thumb-internal.c
index a995d9c..7ecc700 100755
--- a/src/media-thumb-internal.c
+++ b/src/media-thumb-internal.c
@@ -1130,7 +1130,7 @@ int _media_thumb_get_hash_name(const char *file_full_path, char *thumb_hash_path
char file_ext[255] = { 0 };
char *get_path = NULL;
int ret_len = 0;
- ms_user_storage_type_e store_type = -1;
+ ms_user_storage_type_e storage_type = -1;
int ret = MS_MEDIA_ERR_NONE;
if (file_full_path == NULL || thumb_hash_path == NULL || max_thumb_path <= 0) {
@@ -1140,9 +1140,9 @@ int _media_thumb_get_hash_name(const char *file_full_path, char *thumb_hash_path
_media_thumb_get_file_ext(file_full_path, file_ext, sizeof(file_ext));
- ret = ms_user_get_storage_type(uid, file_full_path, &store_type);
- if((ret != MS_MEDIA_ERR_NONE) || ((store_type != MS_USER_STORAGE_INTERNAL) && (store_type != MS_USER_STORAGE_EXTERNAL))) {
- thumb_err_slog("origin path(%s) is invalid. err : [%d] store_type [%d]", file_full_path, ret, store_type);
+ ret = ms_user_get_storage_type(uid, file_full_path, &storage_type);
+ if((ret != MS_MEDIA_ERR_NONE) || ((storage_type != MS_USER_STORAGE_INTERNAL) && (storage_type != MS_USER_STORAGE_EXTERNAL))) {
+ thumb_err_slog("origin path(%s) is invalid. err : [%d] storage_type [%d]", file_full_path, ret, storage_type);
return MS_MEDIA_ERR_INVALID_PARAMETER;
}
@@ -1152,15 +1152,9 @@ int _media_thumb_get_hash_name(const char *file_full_path, char *thumb_hash_path
return MS_MEDIA_ERR_INTERNAL;
}
- if (store_type == MS_USER_STORAGE_EXTERNAL) {
- ret = ms_user_get_mmc_thumb_store_path(uid, &get_path);
- if (get_path != NULL)
- ret_len = snprintf(thumb_hash_path, max_thumb_path - 1, "%s/.%s-%s.jpg", get_path, file_ext, hash_name);
- } else {
- ret = ms_user_get_default_thumb_store_path(uid, &get_path);
- if (get_path != NULL)
- ret_len = snprintf(thumb_hash_path, max_thumb_path - 1, "%s/.%s-%s.jpg", get_path, file_ext, hash_name);
- }
+ ret = ms_user_get_thumb_store_path(uid, storage_type, &get_path);
+ if (get_path != NULL)
+ ret_len = snprintf(thumb_hash_path, max_thumb_path - 1, "%s/.%s-%s.jpg", get_path, file_ext, hash_name);
SAFE_FREE(get_path);