|
@@ -1908,11 +1908,12 @@ public:
|
|
|
" but was forced to ignore it in favor of an external binary – which isn't installed.", compressor.Name.c_str());
|
|
" but was forced to ignore it in favor of an external binary – which isn't installed.", compressor.Name.c_str());
|
|
|
|
|
|
|
|
bool const Comp = (Mode & FileFd::WriteOnly) == FileFd::WriteOnly;
|
|
bool const Comp = (Mode & FileFd::WriteOnly) == FileFd::WriteOnly;
|
|
|
- if (Comp == false)
|
|
|
|
|
|
|
+ if (Comp == false && filefd->iFd != -1)
|
|
|
{
|
|
{
|
|
|
// Handle 'decompression' of empty files
|
|
// Handle 'decompression' of empty files
|
|
|
struct stat Buf;
|
|
struct stat Buf;
|
|
|
- fstat(filefd->iFd, &Buf);
|
|
|
|
|
|
|
+ if (fstat(filefd->iFd, &Buf) != 0)
|
|
|
|
|
+ return filefd->FileFdErrno("fstat", "Could not stat fd %d for file %s", filefd->iFd, filefd->FileName.c_str());
|
|
|
if (Buf.st_size == 0 && S_ISFIFO(Buf.st_mode) == false)
|
|
if (Buf.st_size == 0 && S_ISFIFO(Buf.st_mode) == false)
|
|
|
return true;
|
|
return true;
|
|
|
|
|
|