Fixing idiotic mistake in tar

This commit is contained in:
David Galos 2013-07-18 11:52:01 -04:00
parent 2c75eb98d9
commit c5f10c4b06

5
tar.c
View File

@ -61,7 +61,7 @@ usage(void)
int
main(int argc, char *argv[])
{
char *file, *dir, *ap;
char *file = NULL, *dir = ".", *ap;
char mode = '\0';
ARGBEGIN {
@ -125,8 +125,7 @@ main(int argc, char *argv[])
tarfile = (mode == 'c') ? stdout : stdin;
}
if(dir)
chdir(dir);
chdir(dir);
if(mode == 'c') {
c(argv[0]);