diff options
author | phonologus <59876118+phonologus@users.noreply.github.com> | 2020-01-14 19:52:18 +0000 |
---|---|---|
committer | Dan Cross <crossd@gmail.com> | 2020-01-14 14:52:18 -0500 |
commit | a0691bc460cbef889d017a640034f3321bd36b9d (patch) | |
tree | d3a2d3fdc3c936361c2fad406c1628ba63016fcc /src | |
parent | 8c573cab6819c69142389d36b978b3c683771afe (diff) | |
download | plan9port-a0691bc460cbef889d017a640034f3321bd36b9d.tar.gz plan9port-a0691bc460cbef889d017a640034f3321bd36b9d.tar.bz2 plan9port-a0691bc460cbef889d017a640034f3321bd36b9d.zip |
tar: remove /bin/ when invoking compressors
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd/tar.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/cmd/tar.c b/src/cmd/tar.c index 61e9c4a6..6698675e 100644 --- a/src/cmd/tar.c +++ b/src/cmd/tar.c @@ -179,7 +179,6 @@ static int push(int fd, char *cmd, int input, Pushstate *ps) { int nfd, pifds[2]; - String *s; ps->open = 0; ps->fd = fd; @@ -197,11 +196,7 @@ push(int fd, char *cmd, int input, Pushstate *ps) dup(pifds[Rd], Stdin); close(pifds[input? Rd: Wr]); dup(fd, (input? Stdin: Stdout)); - s = s_new(); - if (cmd[0] != '/') - s_append(s, "/bin/"); - s_append(s, cmd); - execl(s_to_c(s), cmd, nil); + execl(cmd, cmd, nil); sysfatal("can't exec %s: %r", cmd); default: nfd = pifds[input? Rd: Wr]; |