aboutsummaryrefslogtreecommitdiff
path: root/lib/libarchive/archive_write_open_filename.c
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@FreeBSD.org>2006-12-04 08:01:53 +0000
committerTim Kientzle <kientzle@FreeBSD.org>2006-12-04 08:01:53 +0000
commit5af17117297435bbf9f6888c61541474f8af4f6d (patch)
tree47ac88d740f71272a87d23f536c3e225b3c82a67 /lib/libarchive/archive_write_open_filename.c
parent63d8511da861632e43f9a02527ae94d730db5a2a (diff)
Argh. Restore a stat() call that was erroneously removed.
Thanks to: WATANABE, Kazuo Pointy hat: me, from the handy dispenser I keep nearby.
Notes
Notes: svn path=/head/; revision=164868
Diffstat (limited to 'lib/libarchive/archive_write_open_filename.c')
-rw-r--r--lib/libarchive/archive_write_open_filename.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libarchive/archive_write_open_filename.c b/lib/libarchive/archive_write_open_filename.c
index 8f2ece65fd83..702a31e54ea7 100644
--- a/lib/libarchive/archive_write_open_filename.c
+++ b/lib/libarchive/archive_write_open_filename.c
@@ -118,6 +118,12 @@ file_open(struct archive *a, void *client_data)
archive_write_set_bytes_in_last_block(a, 0);
}
+ if (fstat(mine->fd, &st) != 0) {
+ archive_set_error(a, errno, "Couldn't stat '%s'",
+ mine->filename);
+ return (ARCHIVE_FATAL);
+ }
+
/*
* Set up default last block handling.
*/