@@ -250,14 +250,14 @@ IsDir(const char *dirpath, const char *entry)
250250parray *
251251catalog_get_backup_list (time_t requested_backup_id )
252252{
253- DIR * date_dir = NULL ;
254- struct dirent * date_ent = NULL ;
253+ DIR * data_dir = NULL ;
254+ struct dirent * data_ent = NULL ;
255255 parray * backups = NULL ;
256256 pgBackup * backup = NULL ;
257257
258258 /* open backup instance backups directory */
259- date_dir = opendir (backup_instance_path );
260- if (date_dir == NULL )
259+ data_dir = opendir (backup_instance_path );
260+ if (data_dir == NULL )
261261 {
262262 elog (WARNING , "cannot open directory \"%s\": %s" , backup_instance_path ,
263263 strerror (errno ));
@@ -266,21 +266,21 @@ catalog_get_backup_list(time_t requested_backup_id)
266266
267267 /* scan the directory and list backups */
268268 backups = parray_new ();
269- for (; (date_ent = readdir (date_dir )) != NULL ; errno = 0 )
269+ for (; (data_ent = readdir (data_dir )) != NULL ; errno = 0 )
270270 {
271271 char backup_conf_path [MAXPGPATH ];
272- char date_path [MAXPGPATH ];
272+ char data_path [MAXPGPATH ];
273273
274274 /* skip not-directory entries and hidden entries */
275- if (!IsDir (backup_instance_path , date_ent -> d_name )
276- || date_ent -> d_name [0 ] == '.' )
275+ if (!IsDir (backup_instance_path , data_ent -> d_name )
276+ || data_ent -> d_name [0 ] == '.' )
277277 continue ;
278278
279279 /* open subdirectory of specific backup */
280- join_path_components (date_path , backup_instance_path , date_ent -> d_name );
280+ join_path_components (data_path , backup_instance_path , data_ent -> d_name );
281281
282282 /* read backup information from BACKUP_CONTROL_FILE */
283- snprintf (backup_conf_path , MAXPGPATH , "%s/%s" , date_path , BACKUP_CONTROL_FILE );
283+ snprintf (backup_conf_path , MAXPGPATH , "%s/%s" , data_path , BACKUP_CONTROL_FILE );
284284 backup = readBackupControlFile (backup_conf_path );
285285
286286 /* ignore corrupted backups */
@@ -298,8 +298,8 @@ catalog_get_backup_list(time_t requested_backup_id)
298298
299299 if (errno && errno != ENOENT )
300300 {
301- elog (WARNING , "cannot read date directory \"%s\": %s" ,
302- date_ent -> d_name , strerror (errno ));
301+ elog (WARNING , "cannot read data directory \"%s\": %s" ,
302+ data_ent -> d_name , strerror (errno ));
303303 goto err_proc ;
304304 }
305305 }
@@ -310,16 +310,16 @@ catalog_get_backup_list(time_t requested_backup_id)
310310 goto err_proc ;
311311 }
312312
313- closedir (date_dir );
314- date_dir = NULL ;
313+ closedir (data_dir );
314+ data_dir = NULL ;
315315
316316 parray_qsort (backups , pgBackupCompareIdDesc );
317317
318318 return backups ;
319319
320320err_proc :
321- if (date_dir )
322- closedir (date_dir );
321+ if (data_dir )
322+ closedir (data_dir );
323323 if (backup )
324324 pgBackupFree (backup );
325325 if (backups )
0 commit comments