From 5af17117297435bbf9f6888c61541474f8af4f6d Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Mon, 4 Dec 2006 08:01:53 +0000 Subject: [PATCH] Argh. Restore a stat() call that was erroneously removed. Thanks to: WATANABE, Kazuo Pointy hat: me, from the handy dispenser I keep nearby. --- lib/libarchive/archive_write_open_filename.c | 6 ++++++ 1 file changed, 6 insertions(+) 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. */