*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_files.c,v 1.8 2001/03/22 04:00:13 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_files.c,v 1.9 2001/03/23 01:27:12 pjw Exp $
*
*
ReadHead(AH);
ReadToc(AH);
- fclose(AH->FH); /* Nothing else in the file... */
+ /* Nothing else in the file... */
+ if (fclose(AH->FH) != 0)
+ die_horribly(AH, "%s: Could not close TOC file (fclose failed).\n", progname);
}
}
lclTocEntry *tctx = (lclTocEntry *) te->formatData;
/* Close the file */
- GZCLOSE(tctx->FH);
+ if (GZCLOSE(tctx->FH) != 0)
+ die_horribly(AH, "%s: could not close data file\n", progname);
+
tctx->FH = NULL;
}
ahwrite(buf, 1, cnt, AH);
}
- GZCLOSE(AH->FH);
+ if (GZCLOSE(AH->FH) != 0)
+ die_horribly(AH, "%s: could not close data file after reading\n", progname);
+
}
_getBlobTocEntry(AH, &oid, fname);
}
- fclose(ctx->blobToc);
+ if (fclose(ctx->blobToc) != 0)
+ die_horribly(AH, "%s: could not close BLOB TOC file\n", progname);
EndRestoreBlobs(AH);
}
{
WriteHead(AH);
WriteToc(AH);
- fclose(AH->FH);
+ if (fclose(AH->FH) != 0)
+ die_horribly(AH, "%s: could not close TOC file\n", progname);
WriteDataChunks(AH);
}
{
lclTocEntry *tctx = (lclTocEntry *) te->formatData;
- GZCLOSE(tctx->FH);
+ if (GZCLOSE(tctx->FH) != 0)
+ die_horribly(AH, "%s: could not close BLOB file\n", progname);
}
/*
/* Write out a fake zero OID to mark end-of-blobs. */
/* WriteInt(AH, 0); */
- fclose(ctx->blobToc);
+ if (fclose(ctx->blobToc) != 0)
+ die_horribly(AH, "%s: could not close BLOB TOC file\n", progname);
}
+