@@ -236,7 +236,7 @@ merge_backups(pgBackup *to_backup, pgBackup *from_backup)
236236 DATABASE_FILE_LIST );
237237 to_files = dir_read_file_list (NULL , NULL , control_file , FIO_BACKUP_HOST );
238238 /* To delete from leaf, sort in reversed order */
239- parray_qsort (to_files , pgFileComparePathWithExternalDesc );
239+ parray_qsort (to_files , pgFileCompareRelPathWithExternalDesc );
240240 /*
241241 * Get list of files which need to be moved.
242242 */
@@ -385,7 +385,7 @@ merge_backups(pgBackup *to_backup, pgBackup *from_backup)
385385 /*
386386 * Delete files which are not in from_backup file list.
387387 */
388- parray_qsort (files , pgFileComparePathWithExternalDesc );
388+ parray_qsort (files , pgFileCompareRelPathWithExternalDesc );
389389 for (i = 0 ; i < parray_num (to_files ); i ++ )
390390 {
391391 pgFile * file = (pgFile * ) parray_get (to_files , i );
@@ -398,7 +398,7 @@ merge_backups(pgBackup *to_backup, pgBackup *from_backup)
398398 continue ;
399399 }
400400
401- if (parray_bsearch (files , file , pgFileComparePathWithExternalDesc ) == NULL )
401+ if (parray_bsearch (files , file , pgFileCompareRelPathWithExternalDesc ) == NULL )
402402 {
403403 char to_file_path [MAXPGPATH ];
404404 char * prev_path ;
@@ -488,7 +488,7 @@ merge_files(void *arg)
488488 i + 1 , num_files , file -> path );
489489
490490 res_file = parray_bsearch (argument -> to_files , file ,
491- pgFileComparePathWithExternalDesc );
491+ pgFileCompareRelPathWithExternalDesc );
492492 to_file = (res_file ) ? * res_file : NULL ;
493493
494494 join_path_components (to_file_path , argument -> to_root , file -> path );
0 commit comments