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:
@ -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;
|
||||
|
Reference in New Issue
Block a user