summaryrefslogtreecommitdiff
path: root/bin/tar2sqfs
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-09-24 18:50:20 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-09-24 19:24:29 +0200
commite890b0d8be5c038802ae3b670e64c6f1373c32d7 (patch)
tree2d5ce0100b61d6694c169b6f6c306cf56cf3753d /bin/tar2sqfs
parentb96f0fc154feef531be76034bf6e38925636146f (diff)
Fix: tar2sqfs: don't touch the path after determining it is broken
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'bin/tar2sqfs')
-rw-r--r--bin/tar2sqfs/process_tarball.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/bin/tar2sqfs/process_tarball.c b/bin/tar2sqfs/process_tarball.c
index 415e362..d7aac8c 100644
--- a/bin/tar2sqfs/process_tarball.c
+++ b/bin/tar2sqfs/process_tarball.c
@@ -183,9 +183,7 @@ int process_tarball(FILE *input_file, sqfs_writer_t *sqfs)
fprintf(stderr, "skipping '%s' (invalid name)\n",
hdr.name);
skip = true;
- }
-
- if (root_becomes != NULL) {
+ } else if (root_becomes != NULL) {
if (strncmp(hdr.name, root_becomes, rootlen) == 0) {
if (hdr.name[rootlen] == '\0') {
is_root = true;