diff options
author | Rob Landley <rob@landley.net> | 2019-03-27 21:42:41 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-03-27 21:42:41 -0500 |
commit | 7c1601c2faec14b81c84539a64ba662cfe2b0d62 (patch) | |
tree | 613f24ce40bd18a747c9b37d6c4fc6982e6a687c | |
parent | 205b9e243ecab728886b35712546cd8928488796 (diff) | |
download | toybox-7c1601c2faec14b81c84539a64ba662cfe2b0d62.tar.gz |
Skip file contents in error case.
-rw-r--r-- | toys/pending/tar.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/toys/pending/tar.c b/toys/pending/tar.c index 97524d87..8fb047bf 100644 --- a/toys/pending/tar.c +++ b/toys/pending/tar.c @@ -373,7 +373,11 @@ static void extract_to_disk(void) char *name = TT.hdr.name; int ala = TT.hdr.mode; - if (dirflush(name)) return; + if (dirflush(name)) { + if (S_ISREG(ala) && !TT.hdr.link_target) skippy(TT.hdr.size); + + return; + } // create path before file if necessary if (strrchr(name, '/') && mkpath(name) && errno !=EEXIST) |