int ret = MEDIA_CONTENT_ERROR_NONE;
sqlite3_stmt *stmt = NULL;
char select_query[DEFAULT_QUERY_SIZE];
- char *tmp_path = NULL;
- char repl_path[MAX_PATH_LEN] = {0, };
media_folder_s *_folder = NULL;
if (!STRING_VALID(folder_id)) {
}
_folder->folder_id = g_strdup((const char *)sqlite3_column_text(stmt, 0));
-
- tmp_path = g_strdup((const char *)sqlite3_column_text(stmt, 1));
- _media_content_rollback_path(tmp_path, repl_path);
- _folder->path = g_strdup(repl_path);
- SAFE_FREE(tmp_path);
-
+ _folder->path = g_strdup((const char *)sqlite3_column_text(stmt, 1));
_folder->name = g_strdup((const char *)sqlite3_column_text(stmt, 2));
_folder->modified_time = (int)sqlite3_column_int(stmt, 3);
_folder->storage_type = (int)sqlite3_column_int(stmt, 5);
SAFE_FREE(_folder->path);
SAFE_FREE(_folder->name);
SAFE_FREE(folder_path);
- memset(repl_path, 0, sizeof(repl_path));
- ret = _media_content_rollback_path(new_folder_path, repl_path);
- media_content_retvm_if(!STRING_VALID(repl_path), MEDIA_CONTENT_ERROR_INVALID_OPERATION, "path replacement failed");
- _folder->path = strdup(repl_path);
+ _folder->path = strdup(new_folder_path);
media_content_retvm_if(_folder->path == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
_folder->name = strdup(name);
media_content_retvm_if(_folder->name == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");