aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-03-27 21:42:41 -0500
committerRob Landley <rob@landley.net>2019-03-27 21:42:41 -0500
commit7c1601c2faec14b81c84539a64ba662cfe2b0d62 (patch)
tree613f24ce40bd18a747c9b37d6c4fc6982e6a687c /toys
parent205b9e243ecab728886b35712546cd8928488796 (diff)
downloadtoybox-7c1601c2faec14b81c84539a64ba662cfe2b0d62.tar.gz
Skip file contents in error case.
Diffstat (limited to 'toys')
-rw-r--r--toys/pending/tar.c6
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)