From: cristy Date: Sat, 16 Oct 2010 17:00:58 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~8675 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ff48337b74a1403470013388d655534937bf61b2;p=imagemagick --- diff --git a/magick/blob.c b/magick/blob.c index d7df8e497..0c3c1d7b7 100644 --- a/magick/blob.c +++ b/magick/blob.c @@ -530,7 +530,10 @@ MagickExport MagickBooleanType CloseBlob(Image *image) case StandardStream: { if (image->blob->synchronize != MagickFalse) - status=fsync(fileno(image->blob->file)); + { + status=fflush(image->blob->file); + status=fsync(fileno(image->blob->file)); + } status=fclose(image->blob->file); break; } @@ -556,8 +559,17 @@ MagickExport MagickBooleanType CloseBlob(Image *image) break; } case FifoStream: + break; case BlobStream: + { + if (image->blob->file != (FILE *) NULL) + { + if (image->blob->synchronize != MagickFalse) + (void) fsync(fileno(image->blob->file)); + status=fclose(image->blob->file); + } break; + } } (void) DetachBlob(image->blob); image->blob->status=status < 0 ? MagickTrue : MagickFalse;