Thread View: net.bugs.2bsd
1 messages
1 total messages
Started by Dave Steffens
Wed, 03 Sep 1986 18:48
bug in tar(1) compare option (FIX)
Author: Dave Steffens
Date: Wed, 03 Sep 1986 18:48
Date: Wed, 03 Sep 1986 18:48
34 lines
1493 bytes
1493 bytes
Subject: bug in tar(1) compare option (FIX)
Index: /usr/src/bin/tar.c
Description:
The compare (C) option of tar(1) fails to correctly report
a difference error when a file in the archive is not the same
length as the corresponding file on the disk.
Repeat-by:
% echo this is a test >blap
% tar cvf flap blap
a blap 1 blocks
% ls -l blap
-rw-rw-r-- 1 das bin 15 Sep 3 14:30 blap
% tar Cvf flap
same rw-rw-r-- 11/3 15 Sep 3 14:30 1986 blap
% echo add another line >>blap
% ls -l blap
-rw-rw-r-- 1 das bin 32 Sep 3 14:30 blap
% tar Cvf flap
same rw-rw-r-- 11/3 15 Sep 3 14:30 1986 blap
Fix:
Make the following change:
777c777
< if (fstat(ifile, &stbuf2) < 0 || bytes != stbuf.st_size)
---
> if (fstat(ifile, &stbuf2) < 0 || bytes != stbuf2.st_size)
--
{harvard,mit-eddie,think}!eplunix!earvax!das David Allan Steffens
243 Charles St., Boston, MA 02114 Eaton-Peabody Laboratory
(617) 523-7900 x2748 Mass. Eye & Ear Infirmary
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads