Index: src/modules/cdi/lib/fs/lostio_if.c =================================================================== --- src/modules/cdi/lib/fs/lostio_if.c (Revision 937) +++ src/modules/cdi/lib/fs/lostio_if.c (Arbeitskopie) @@ -394,7 +394,8 @@ size = dh->res->file->read(dh, fh->pos, size, buf); fh->pos += size; - if(fh->pos >= fh->node->size) { + if(fh->pos >= fh->node->size || (size == 0) || + (dh->error == CDI_FS_ERROR_EOF)) { fh->flags |= LOSTIO_FLAG_EOF; } else { fh->flags &= ~LOSTIO_FLAG_EOF;