summaryrefslogtreecommitdiff
path: root/lib/tar/write_header.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-28 11:17:37 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-28 11:17:37 +0200
commit1582ca88cb056d84a93cd40731d362083dad8cd4 (patch)
tree4f3bc49418c2277676e61425225920c972274e7e /lib/tar/write_header.c
parent154532d71c447e73c70ec06d26628bb6919b9a5a (diff)
Add basic support for the GNU tar format
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/tar/write_header.c')
-rw-r--r--lib/tar/write_header.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tar/write_header.c b/lib/tar/write_header.c
index 80db327..d9db24a 100644
--- a/lib/tar/write_header.c
+++ b/lib/tar/write_header.c
@@ -33,14 +33,14 @@ static int name_to_tar_header(tar_header_t *hdr, const char *path)
return -1;
len = ptr - path;
- if (len >= sizeof(hdr->prefix))
+ if (len >= sizeof(hdr->tail.posix.prefix))
continue;
if (strlen(ptr + 1) >= sizeof(hdr->name))
continue;
break;
}
- memcpy(hdr->prefix, path, ptr - path);
+ memcpy(hdr->tail.posix.prefix, path, ptr - path);
memcpy(hdr->name, ptr + 1, strlen(ptr + 1));
return 0;
}