summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/media-thumb-internal.c20
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);