}
#endif
-static int __ms_user_get_path(ms_user_path_type_e type, const char *storage_id, uid_t uid, char **path)
+static int __ms_user_get_path(ms_user_path_type_e type, uid_t uid, char **path)
{
int ret = MS_MEDIA_ERR_NONE;
const char *result = NULL;
if (uid == getuid())
*path = g_strndup(MEDIA_ROOT_PATH_INTERNAL, strlen(MEDIA_ROOT_PATH_INTERNAL));
else
- ret = __ms_user_get_path(INTERNAL_ROOT, NULL, uid, path);
+ ret = __ms_user_get_path(INTERNAL_ROOT, uid, path);
//MSAPI_DBG_SLOG("internal root path [%s]", *path);
ret = ms_user_get_internal_root_path(uid, &internal_path);
MSAPI_RETVM_IF(ret != MS_MEDIA_ERR_NONE, ret, "Fail get internal root path");
+ MSAPI_RETVM_IF(internal_path == NULL, ret, "Fail get internal root path (NULL)");
path_len = strlen(internal_path);
if (uid == getuid())
*path = g_strdup(tzplatform_mkpath(TZ_USER_SHARE, "media/.thumb"));
else
- ret = __ms_user_get_path(THUMB_ROOT, NULL, uid, path);
+ ret = __ms_user_get_path(THUMB_ROOT, uid, path);
//MSAPI_DBG_SLOG("thumb path [%s]", *path);
if (uid == getuid())
*path = g_strdup(tzplatform_mkpath(TZ_USER_DB, ".media.db"));
else
- ret = __ms_user_get_path(MEDIA_DB, NULL, uid, path);
+ ret = __ms_user_get_path(MEDIA_DB, uid, path);
//MSAPI_DBG_SLOG("DB path [%s]", *path);
if (uid == getuid())
*path = g_strdup(tzplatform_getenv(TZ_USER_MEDIASHARED));
else
- ret = __ms_user_get_path(MEDIA_SHARED, NULL, uid, path);
+ ret = __ms_user_get_path(MEDIA_SHARED, uid, path);
//MSAPI_DBG_SLOG("DB path [%s]", *path);