diff options
Diffstat (limited to 'src/media-thumbnail.c')
-rwxr-xr-x | src/media-thumbnail.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/media-thumbnail.c b/src/media-thumbnail.c index dab1de7..4792ac1 100755 --- a/src/media-thumbnail.c +++ b/src/media-thumbnail.c @@ -52,11 +52,11 @@ int thumbnail_request_from_db_with_size(const char *origin_path, char *thumb_pat return MS_MEDIA_ERR_INVALID_PARAMETER; } - int store_type = -1; - store_type = _media_thumb_get_store_type_by_path(origin_path); + ms_user_storage_type_t store_type = -1; + err = ms_user_get_storage_type(uid, origin_path, &store_type); - if ((store_type != THUMB_PHONE) && (store_type != THUMB_MMC)) { - thumb_err("origin path(%s) is invalid", origin_path); + if((err != MS_MEDIA_ERR_NONE) || ((store_type != MS_USER_STORAGE_INTERNAL) && (store_type != MS_USER_STORAGE_EXTERNAL))) { + thumb_err("origin path(%s) is invalid. err : [%d] store_type [%d]", origin_path, err, store_type); return MS_MEDIA_ERR_INVALID_PARAMETER; } @@ -107,11 +107,11 @@ int thumbnail_request_from_db_async(unsigned int request_id, const char *origin_ return MS_MEDIA_ERR_INVALID_PARAMETER; } - int store_type = -1; - store_type = _media_thumb_get_store_type_by_path(origin_path); + ms_user_storage_type_t store_type = -1; + err = ms_user_get_storage_type(uid, origin_path, &store_type); - if ((store_type != THUMB_PHONE) && (store_type != THUMB_MMC)) { - thumb_err("origin path(%s) is invalid", origin_path); + if((err != MS_MEDIA_ERR_NONE) || ((store_type != MS_USER_STORAGE_INTERNAL) && (store_type != MS_USER_STORAGE_EXTERNAL))) { + thumb_err("origin path(%s) is invalid. err : [%d] store_type [%d]", origin_path, err, store_type); return MS_MEDIA_ERR_INVALID_PARAMETER; } |