]> Dogcows Code - chaz/tar/blobdiff - src/compare.c
Update FSF postal mail address.
[chaz/tar] / src / compare.c
index 7e5d565e15202ad81f3ab3e81d2bc0aad94284a5..0ad12233c9b3d2ec85eb882bb756eaf40d13d779 100644 (file)
@@ -17,7 +17,7 @@
 
    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
-   59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 #include <system.h>
 
@@ -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,
@@ -241,9 +243,9 @@ diff_file ()
        }
       else
        {
-         int fd = open (current_stat_info.file_name, O_RDONLY | O_BINARY);
+         diff_handle = open (current_stat_info.file_name, O_RDONLY | O_BINARY);
 
-         if (fd < 0)
+         if (diff_handle < 0)
            {
              open_error (current_stat_info.file_name);
              skip_member ();
@@ -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.  */
                    }
@@ -275,7 +278,7 @@ diff_file ()
                    assign_string (&save_name, 0);
                }
 
-             status = close (fd);
+             status = close (diff_handle);
              if (status != 0)
                close_error (current_stat_info.file_name);
 
@@ -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.  */
This page took 0.021895 seconds and 4 git commands to generate.