[comp.os.minix] Bug in tar.c

vizard@dartvax.UUCP (Todd Krein) (05/04/87)

[munch]

	Here's a bug fix for tar. if you typed 'tar c /dev/at0 /usr/*'
it would create incorrect file names. Very simple fix, just clear the
path name after doing each command line filename.

diff tar.c tar.new

60a61,62
> char path[NAME_SIZE];
> char pathname[NAME_SIZE];
111c113
< 	for (i = 3; i < argc; i++)
---
> 	for (i = 3; i < argc; i++) {
112a115,116
> 		path[0] = '\0';
> 	}
281d284
< char path[NAME_SIZE];
283d285
< char pathname[NAME_SIZE];

	Todd Krein
	vizard@dartvax