diff options
author | kientzle <kientzle@FreeBSD.org> | 2008-08-24 04:58:22 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2008-08-24 04:58:22 +0000 |
commit | 96d726228acbea45a859130dfc29b7569c637a98 (patch) | |
tree | 69af9cb7f1d0b336ed16c57e23bf0cf7c3898868 /usr.bin/cpio/test/main.c | |
parent | 09865bc91a074052523008139a9215a27e916fa6 (diff) | |
download | FreeBSD-src-96d726228acbea45a859130dfc29b7569c637a98.zip FreeBSD-src-96d726228acbea45a859130dfc29b7569c637a98.tar.gz |
Test for a bug reported by Bernd Walter: In passthrough mode,
copying "dir/file" and then copying "dir" results in
"File on disk is not older; skipping" for the "dir" because
it was implicitly created by "dir/file." Among other sins,
this means that "dir" ends up with the wrong permissions
and ownership.
This is actually a libarchive bug; fix is forthcoming.
Diffstat (limited to 'usr.bin/cpio/test/main.c')
-rw-r--r-- | usr.bin/cpio/test/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/cpio/test/main.c b/usr.bin/cpio/test/main.c index 133f4a9..8318620 100644 --- a/usr.bin/cpio/test/main.c +++ b/usr.bin/cpio/test/main.c @@ -598,8 +598,8 @@ test_assert_file_contents(const void *buff, int s, const char *fpattern, ...) va_end(ap); fd = open(f, O_RDONLY); - contents = malloc(s * 2); - n = read(fd, contents, s * 2); + contents = malloc(s * 2 + 128); + n = read(fd, contents, s * 2 + 128); if (n == s && memcmp(buff, contents, s) == 0) { free(contents); return (1); |