Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit55d5ff8

Browse files
committed
Fix detection of short tar files, broken by commit14ea893
Report by Noah Misch
1 parent2e54d88 commit55d5ff8

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

‎src/bin/pg_dump/pg_backup_archiver.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2034,10 +2034,13 @@ _discoverArchiveFormat(ArchiveHandle *AH)
20342034
exit_horribly(modulename,"input file appears to be a text format dump. Please use psql.\n");
20352035
}
20362036

2037-
if (AH->lookaheadLen!=512&&feof(fh))
2038-
exit_horribly(modulename,"input file does not appear to be a valid archive (too short?)\n");
2039-
else
2040-
READ_ERROR_EXIT(fh);
2037+
if (AH->lookaheadLen!=512)
2038+
{
2039+
if (feof(fh))
2040+
exit_horribly(modulename,"input file does not appear to be a valid archive (too short?)\n");
2041+
else
2042+
READ_ERROR_EXIT(fh);
2043+
}
20412044

20422045
if (!isValidTarHeader(AH->lookahead))
20432046
exit_horribly(modulename,"input file does not appear to be a valid archive\n");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp