diff options
author | Minje Ahn <minje.ahn@samsung.com> | 2017-08-17 17:17:26 +0900 |
---|---|---|
committer | Minje Ahn <minje.ahn@samsung.com> | 2017-08-17 17:17:26 +0900 |
commit | 6b535fe0b47301c5883d90828cf78ce98108fa13 (patch) | |
tree | e650d67c09f840f552cf3be1b653b0bb6c78dd59 /src/media-thumb-internal.c | |
parent | 51faec4d848b9cd7a5d53a61899942e44749ef7e (diff) | |
download | libmedia-thumbnail-accepted/tizen/unified/20170822.023749.tar.gz libmedia-thumbnail-accepted/tizen/unified/20170822.023749.tar.bz2 libmedia-thumbnail-accepted/tizen/unified/20170822.023749.zip |
Merge function for getting thumbnail foldersubmit/tizen_4.0/20170828.110004submit/tizen_4.0/20170828.100004submit/tizen/20170824.010707submit/tizen/20170821.010252accepted/tizen/unified/20170824.051003accepted/tizen/unified/20170822.023749accepted/tizen/4.0/unified/20170829.020116
Change-Id: Idad1a8ca2ca97a3cb5b53fe23133152502f734bb
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
Diffstat (limited to 'src/media-thumb-internal.c')
-rwxr-xr-x | src/media-thumb-internal.c | 20 |
1 files changed, 7 insertions, 13 deletions
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); |