From 5df30507aab2b92d09bfe98bf10df3d285dde0a0 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Tue, 16 Feb 2010 19:40:07 +0000 Subject: [PATCH] Bug fix on FreeBSD: Piped input was falsely attributed a small fixed size --- libburn/trunk/cdrskin/cdrskin_timestamp.h | 2 +- libburn/trunk/libburn/file.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libburn/trunk/cdrskin/cdrskin_timestamp.h b/libburn/trunk/cdrskin/cdrskin_timestamp.h index 44f60e74..b2da18fc 100644 --- a/libburn/trunk/cdrskin/cdrskin_timestamp.h +++ b/libburn/trunk/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2010.02.15.125922" +#define Cdrskin_timestamP "2010.02.16.194147" diff --git a/libburn/trunk/libburn/file.c b/libburn/trunk/libburn/file.c index 880d4835..7340abad 100644 --- a/libburn/trunk/libburn/file.c +++ b/libburn/trunk/libburn/file.c @@ -89,7 +89,9 @@ static off_t file_size(struct burn_source *source) if (fs->fixed_size > 0) return fs->fixed_size; - if (fstat(fs->datafd, &buf) == -1) + if (fstat(fs->datafd, &buf) != 0) + return (off_t) 0; + if ((buf.st_mode & S_IFMT) != S_IFREG) return (off_t) 0; return (off_t) buf.st_size; }