@@ -250,14 +250,14 @@ IsDir(const char *dirpath, const char *entry)
250
250
parray *
251
251
catalog_get_backup_list (time_t requested_backup_id )
252
252
{
253
- DIR * date_dir = NULL ;
254
- struct dirent * date_ent = NULL ;
253
+ DIR * data_dir = NULL ;
254
+ struct dirent * data_ent = NULL ;
255
255
parray * backups = NULL ;
256
256
pgBackup * backup = NULL ;
257
257
258
258
/* 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 )
261
261
{
262
262
elog (WARNING , "cannot open directory \"%s\": %s" , backup_instance_path ,
263
263
strerror (errno ));
@@ -266,21 +266,21 @@ catalog_get_backup_list(time_t requested_backup_id)
266
266
267
267
/* scan the directory and list backups */
268
268
backups = parray_new ();
269
- for (; (date_ent = readdir (date_dir )) != NULL ; errno = 0 )
269
+ for (; (data_ent = readdir (data_dir )) != NULL ; errno = 0 )
270
270
{
271
271
char backup_conf_path [MAXPGPATH ];
272
- char date_path [MAXPGPATH ];
272
+ char data_path [MAXPGPATH ];
273
273
274
274
/* 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 ] == '.' )
277
277
continue ;
278
278
279
279
/* 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 );
281
281
282
282
/* 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 );
284
284
backup = readBackupControlFile (backup_conf_path );
285
285
286
286
/* ignore corrupted backups */
@@ -298,8 +298,8 @@ catalog_get_backup_list(time_t requested_backup_id)
298
298
299
299
if (errno && errno != ENOENT )
300
300
{
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 ));
303
303
goto err_proc ;
304
304
}
305
305
}
@@ -310,16 +310,16 @@ catalog_get_backup_list(time_t requested_backup_id)
310
310
goto err_proc ;
311
311
}
312
312
313
- closedir (date_dir );
314
- date_dir = NULL ;
313
+ closedir (data_dir );
314
+ data_dir = NULL ;
315
315
316
316
parray_qsort (backups , pgBackupCompareIdDesc );
317
317
318
318
return backups ;
319
319
320
320
err_proc :
321
- if (date_dir )
322
- closedir (date_dir );
321
+ if (data_dir )
322
+ closedir (data_dir );
323
323
if (backup )
324
324
pgBackupFree (backup );
325
325
if (backups )
0 commit comments