]> Dogcows Code - chaz/tar/blobdiff - src/delete.c
Fix Debian bug 230872, originally reported by Jeff King in
[chaz/tar] / src / delete.c
index b79321ff319b08c3a2d306e4cda2ca3d8eb45189..b4cdd3be8a400befc6adc26eb7bbedf96ff00026 100644 (file)
@@ -234,7 +234,7 @@ delete_archive_members (void)
   if (logical_status == HEADER_SUCCESS
       || logical_status == HEADER_SUCCESS_EXTENDED)
     {
-      write_archive_to_stdout = 0;
+      write_archive_to_stdout = false;
 
       /* Save away blocks before this one in this record.  */
 
@@ -383,13 +383,7 @@ delete_archive_members (void)
 
   if (! acting_as_filter && ! _isrmt (archive))
     {
-#if MSDOS
-      int status = write (archive, "", 0);
-#else
-      off_t pos = lseek (archive, (off_t) 0, SEEK_CUR);
-      int status = pos < 0 ? -1 : ftruncate (archive, pos);
-#endif
-      if (status != 0)
+      if (sys_truncate (archive))
        truncate_warn (archive_name_array[0]);
     }
 
This page took 0.020597 seconds and 4 git commands to generate.