@@ -295,6 +295,16 @@ static void get_file_size_posix(const char* file_path, uint64_t* file_size) {
295295 }
296296}
297297
298+ uint64_t ds3_get_file_size (const char * file_path ) {
299+ uint64_t size = 0 ;
300+ #ifdef _WIN32
301+ get_file_size_windows (file_path , & size );
302+ #else
303+ get_file_size_posix (file_path , & size );
304+ #endif
305+ return size ;
306+ }
307+
298308static ds3_bulk_object_response * _ds3_bulk_object_from_file (const char * file_name , const char * base_path ) {
299309 struct stat file_info ;
300310 int result ;
@@ -350,6 +360,8 @@ ds3_bulk_object_list_response* ds3_convert_object_list(const ds3_contents_respon
350360 for (object_index = 0 ; object_index < num_objects ; object_index ++ ) {
351361 ds3_bulk_object_response * response = g_new0 (ds3_bulk_object_response , 1 );
352362 response -> name = ds3_str_dup (objects [object_index ]-> key );
363+ response -> version = ds3_str_dup (objects [object_index ]-> version_id );
364+
353365 g_ptr_array_add (ds3_bulk_object_response_array , response );
354366 }
355367
@@ -729,6 +741,7 @@ void ds3_s3_object_response_free(ds3_s3_object_response* response) {
729741 ds3_str_free (response -> creation_date );
730742 ds3_str_free (response -> id );
731743 ds3_str_free (response -> name );
744+ ds3_str_free (response -> version );
732745
733746 g_free (response );
734747}
@@ -1039,7 +1052,7 @@ void ds3_pool_response_free(ds3_pool_response* response) {
10391052 ds3_str_free (response -> mountpoint );
10401053 ds3_str_free (response -> name );
10411054 ds3_str_free (response -> partition_id );
1042- ds3_str_free (response -> storage_domain_id );
1055+ ds3_str_free (response -> storage_domain_member_id );
10431056
10441057 g_free (response );
10451058}
@@ -1075,6 +1088,7 @@ void ds3_suspect_blob_pool_response_free(ds3_suspect_blob_pool_response* respons
10751088 ds3_str_free (response -> date_written );
10761089 ds3_str_free (response -> id );
10771090 ds3_str_free (response -> last_accessed );
1091+ ds3_str_free (response -> obsoletion_id );
10781092 ds3_str_free (response -> pool_id );
10791093
10801094 g_free (response );
@@ -1086,6 +1100,7 @@ void ds3_suspect_blob_tape_response_free(ds3_suspect_blob_tape_response* respons
10861100
10871101 ds3_str_free (response -> blob_id );
10881102 ds3_str_free (response -> id );
1103+ ds3_str_free (response -> obsoletion_id );
10891104 ds3_str_free (response -> tape_id );
10901105
10911106 g_free (response );
@@ -1110,7 +1125,7 @@ void ds3_tape_response_free(ds3_tape_response* response) {
11101125 ds3_str_free (response -> partially_verified_end_of_tape );
11111126 ds3_str_free (response -> partition_id );
11121127 ds3_str_free (response -> serial_number );
1113- ds3_str_free (response -> storage_domain_id );
1128+ ds3_str_free (response -> storage_domain_member_id );
11141129 ds3_str_free (response -> type );
11151130
11161131 g_free (response );
@@ -2741,6 +2756,7 @@ void ds3_bulk_object_response_free(ds3_bulk_object_response* response) {
27412756 ds3_str_free (response -> id );
27422757 ds3_str_free (response -> name );
27432758 ds3_physical_placement_response_free (response -> physical_placement );
2759+ ds3_str_free (response -> version );
27442760
27452761 g_free (response );
27462762}
@@ -2754,6 +2770,7 @@ void ds3_bulk_object_list_response_free(ds3_bulk_object_list_response* response)
27542770 ds3_bulk_object_response_free (response -> objects [index ]);
27552771 }
27562772 g_free (response -> objects );
2773+ ds3_paging_free (response -> paging );
27572774
27582775 g_free (response );
27592776}
@@ -2779,6 +2796,7 @@ void ds3_job_creation_failed_notification_payload_response_free(ds3_job_creation
27792796
27802797 ds3_str_free (response -> notification_generation_date );
27812798 ds3_tapes_must_be_onlined_response_free (response -> tapes_must_be_onlined );
2799+ ds3_str_free (response -> user_name );
27822800
27832801 g_free (response );
27842802}
@@ -2966,6 +2984,7 @@ void ds3_contents_response_free(ds3_contents_response* response) {
29662984 ds3_str_free (response -> last_modified );
29672985 ds3_user_response_free (response -> owner );
29682986 ds3_str_free (response -> storage_class );
2987+ ds3_str_free (response -> version_id );
29692988
29702989 g_free (response );
29712990}
@@ -2981,6 +3000,7 @@ void ds3_detailed_s3_object_response_free(ds3_detailed_s3_object_response* respo
29813000 ds3_str_free (response -> id );
29823001 ds3_str_free (response -> name );
29833002 ds3_str_free (response -> owner );
3003+ ds3_str_free (response -> version );
29843004
29853005 g_free (response );
29863006}
@@ -3031,6 +3051,10 @@ void ds3_list_bucket_result_response_free(ds3_list_bucket_result_response* respo
30313051 }
30323052 g_free (response -> objects );
30333053 ds3_str_free (response -> prefix );
3054+ for (index = 0 ; index < response -> num_versioned_objects ; index ++ ) {
3055+ ds3_contents_response_free (response -> versioned_objects [index ]);
3056+ }
3057+ g_free (response -> versioned_objects );
30343058
30353059 g_free (response );
30363060}
0 commit comments