From: Sergey Poznyakoff Date: Thu, 7 Apr 2005 17:26:42 +0000 (+0000) Subject: (diff_init): Read directory file if in listed X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=781d3818e520a7fe6ab1ceb051bc13777f8511d7;p=chaz%2Ftar (diff_init): Read directory file if in listed incremental. This prevents spurious 'Contents differ' diagnostics. (diff_archive): Minor fixes to text messages (diff_file,diff_dumpdir,diff_multivol): Assign orig_file_name to save_name uniformly over the program. This fixes matching directory names at the start of an archive volume. --- diff --git a/src/compare.c b/src/compare.c index 7e5d565..d23a68a 100644 --- a/src/compare.c +++ b/src/compare.c @@ -56,6 +56,8 @@ diff_init (void) { void *ptr; diff_buffer = page_aligned_alloc (&ptr, record_size); + if (listed_incremental_option) + read_directory_file (); } /* Sigh about something that differs by writing a MESSAGE to stdlis, @@ -263,7 +265,8 @@ diff_file () { if (multi_volume_option) { - assign_string (&save_name, current_stat_info.file_name); + assign_string (&save_name, + current_stat_info.orig_file_name); save_totsize = current_stat_info.stat.st_size; /* save_sizeleft is set in read_and_process. */ } @@ -365,7 +368,7 @@ diff_dumpdir () if (multi_volume_option) { - assign_string (&save_name, current_stat_info.file_name); + assign_string (&save_name, current_stat_info.orig_file_name); save_totsize = current_stat_info.stat.st_size; /* save_sizeleft is set in read_and_process. */ } @@ -433,7 +436,7 @@ diff_multivol () if (multi_volume_option) { - assign_string (&save_name, current_stat_info.file_name); + assign_string (&save_name, current_stat_info.orig_file_name); save_totsize = stat_data.st_size; /* save_sizeleft is set in read_and_process. */ } @@ -468,7 +471,7 @@ diff_archive (void) switch (current_header->header.typeflag) { default: - ERROR ((0, 0, _("%s: Unknown file type '%c', diffed as normal file"), + ERROR ((0, 0, _("%s: Unknown file type `%c', diffed as normal file"), quotearg_colon (current_stat_info.file_name), current_header->header.typeflag)); /* Fall through. */