aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_dump/pg_backup_directory.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/bin/pg_dump/pg_backup_directory.c b/src/bin/pg_dump/pg_backup_directory.c
index 2c75caec488..4efd8c7bbd8 100644
--- a/src/bin/pg_dump/pg_backup_directory.c
+++ b/src/bin/pg_dump/pg_backup_directory.c
@@ -442,42 +442,42 @@ _LoadBlobs(ArchiveHandle *AH)
{
Oid oid;
lclContext *ctx = (lclContext *) AH->formatData;
- char fname[MAXPGPATH];
+ char tocfname[MAXPGPATH];
char line[MAXPGPATH];
StartRestoreBlobs(AH);
- setFilePath(AH, fname, "blobs.toc");
+ setFilePath(AH, tocfname, "blobs.toc");
- ctx->blobsTocFH = cfopen_read(fname, PG_BINARY_R);
+ ctx->blobsTocFH = cfopen_read(tocfname, PG_BINARY_R);
if (ctx->blobsTocFH == NULL)
exit_horribly(modulename, "could not open large object TOC file \"%s\" for input: %s\n",
- fname, strerror(errno));
+ tocfname, strerror(errno));
/* Read the blobs TOC file line-by-line, and process each blob */
while ((cfgets(ctx->blobsTocFH, line, MAXPGPATH)) != NULL)
{
- char fname[MAXPGPATH + 1];
+ char blobfname[MAXPGPATH + 1];
char path[MAXPGPATH];
- /* Can't overflow because line and fname are the same length. */
- if (sscanf(line, "%u %" CppAsString2(MAXPGPATH) "s\n", &oid, fname) != 2)
+ /* Can't overflow because line and blobfname are the same length. */
+ if (sscanf(line, "%u %" CppAsString2(MAXPGPATH) "s\n", &oid, blobfname) != 2)
exit_horribly(modulename, "invalid line in large object TOC file \"%s\": \"%s\"\n",
- fname, line);
+ tocfname, line);
StartRestoreBlob(AH, oid, AH->public.ropt->dropSchema);
- snprintf(path, MAXPGPATH, "%s/%s", ctx->directory, fname);
+ snprintf(path, MAXPGPATH, "%s/%s", ctx->directory, blobfname);
_PrintFileData(AH, path);
EndRestoreBlob(AH, oid);
}
if (!cfeof(ctx->blobsTocFH))
exit_horribly(modulename, "error reading large object TOC file \"%s\"\n",
- fname);
+ tocfname);
if (cfclose(ctx->blobsTocFH) != 0)
exit_horribly(modulename, "could not close large object TOC file \"%s\": %s\n",
- fname, strerror(errno));
+ tocfname, strerror(errno));
ctx->blobsTocFH = NULL;