1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-09 22:41:56 +03:00

Final (?) fix for tar (null block at end)

Dump template db in dumpall
This commit is contained in:
Philip Warner
2000-10-25 10:21:38 +00:00
parent 03f9e5a5fc
commit 48f0490809
3 changed files with 24 additions and 3 deletions

View File

@ -721,7 +721,7 @@ static void _CloseArchive(ArchiveHandle* AH)
lclContext* ctx = (lclContext*)AH->formatData;
TAR_MEMBER *th;
RestoreOptions *ropt;
int savVerbose;
int savVerbose, i;
if (AH->mode == archModeWrite) {
@ -774,6 +774,13 @@ static void _CloseArchive(ArchiveHandle* AH)
AH->public.verbose = savVerbose;
tarClose(AH, th);
/* Add a block of NULLs since it's de-rigeur. */
for(i=0; i<512; i++)
{
fputc(0, ctx->tarFH);
}
}
AH->FH = NULL;