int media_svc_check_folder_exist_by_path(sqlite3 *handle, const char *storage_id, const char *folder_path)
{
- int ret = MS_MEDIA_ERR_NONE;
- int count = -1;
-
- ret = _media_svc_count_folder_with_path(handle, storage_id, folder_path, &count);
- media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
-
- if (count > 0) {
- media_svc_debug("item is exist in database");
- return MS_MEDIA_ERR_NONE;
- } else {
- media_svc_debug("item is not exist in database");
- return MS_MEDIA_ERR_DB_NO_RECORD;
- }
-
- return MS_MEDIA_ERR_NONE;
+ return _media_svc_check_folder_by_path(handle, storage_id, folder_path);
}
int media_svc_append_query(const char *query, uid_t uid)