git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2e54d88)
Fix detection of short tar files, broken by commit 14ea89366fe321609afc5838ff9fe2ded1...
Tue, 6 May 2014 14:00:57 +0000 (10:00 -0400)
Tue, 6 May 2014 14:01:20 +0000 (10:01 -0400)
Report by Noah Misch


diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c
index adf91e1697c9b91f2e1b559b9ab286eb80d61903..2fa21193f51c09cbbdaa952f7aaafb14477ca65c 100644 (file)
--- a/src/bin/pg_dump/pg_backup_archiver.c
+++ b/src/bin/pg_dump/pg_backup_archiver.c
@@ -2034,10 +2034,13 @@ _discoverArchiveFormat(ArchiveHandle *AH)
exit_horribly(modulename, "input file appears to be a text format dump. Please use psql.\n");
}
- if (AH->lookaheadLen != 512 && feof(fh))
- exit_horribly(modulename, "input file does not appear to be a valid archive (too short?)\n");
- else
- READ_ERROR_EXIT(fh);
+ if (AH->lookaheadLen != 512)
+ {
+ if (feof(fh))
+ exit_horribly(modulename, "input file does not appear to be a valid archive (too short?)\n");
+ else
+ READ_ERROR_EXIT(fh);
+ }
if (!isValidTarHeader(AH->lookahead))
exit_horribly(modulename, "input file does not appear to be a valid archive\n");
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /