Skip to content

Commit 2f7f677

Browse files
committed
replace quotes with double quotes
1 parent 59715f2 commit 2f7f677

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

src/data.c

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ backup_data_file(ConnectionArgs* conn_arg, pgFile *file,
570570

571571
/* sanity */
572572
if (file->size % BLCKSZ != 0)
573-
elog(WARNING, "File: '%s', invalid file size %zu", from_fullpath, file->size);
573+
elog(WARNING, "File: \"%s\", invalid file size %zu", from_fullpath, file->size);
574574

575575
/*
576576
* Compute expected number of blocks in the file.
@@ -609,12 +609,12 @@ backup_data_file(ConnectionArgs* conn_arg, pgFile *file,
609609
/* open backup file for write */
610610
out = fopen(to_fullpath, PG_BINARY_W);
611611
if (out == NULL)
612-
elog(ERROR, "Cannot open backup file '%s': %s",
612+
elog(ERROR, "Cannot open backup file \"%s\": %s",
613613
to_fullpath, strerror(errno));
614614

615615
/* update file permission */
616616
if (chmod(to_fullpath, FILE_PERMISSION) == -1)
617-
elog(ERROR, "Cannot change mode of '%s': %s", to_fullpath,
617+
elog(ERROR, "Cannot change mode of \"%s\": %s", to_fullpath,
618618
strerror(errno));
619619

620620
/*
@@ -657,22 +657,22 @@ backup_data_file(ConnectionArgs* conn_arg, pgFile *file,
657657
/* check for errors */
658658
if (rc == FILE_MISSING)
659659
{
660-
elog(LOG, "File '%s' is not found", from_fullpath);
660+
elog(LOG, "File \"%s\" is not found", from_fullpath);
661661
file->write_size = FILE_NOT_FOUND;
662662
goto cleanup;
663663
}
664664

665665
else if (rc == WRITE_FAILED)
666-
elog(ERROR, "Cannot write block %u of '%s': %s",
666+
elog(ERROR, "Cannot write block %u of \"%s\": %s",
667667
err_blknum, to_fullpath, strerror(errno));
668668

669669
else if (rc == PAGE_CORRUPTION)
670670
{
671671
if (errmsg)
672-
elog(ERROR, "Corruption detected in file '%s', block %u: %s",
672+
elog(ERROR, "Corruption detected in file \"%s\", block %u: %s",
673673
from_fullpath, err_blknum, errmsg);
674674
else
675-
elog(ERROR, "Corruption detected in file '%s', block %u",
675+
elog(ERROR, "Corruption detected in file \"%s\", block %u",
676676
from_fullpath, err_blknum);
677677
}
678678
/* OPEN_FAILED and READ_FAILED */
@@ -681,14 +681,14 @@ backup_data_file(ConnectionArgs* conn_arg, pgFile *file,
681681
if (errmsg)
682682
elog(ERROR, "%s", errmsg);
683683
else
684-
elog(ERROR, "Failed to open for reading remote file '%s'", from_fullpath);
684+
elog(ERROR, "Failed to open for reading remote file \"%s\"", from_fullpath);
685685
}
686686
else if (rc == READ_FAILED)
687687
{
688688
if (errmsg)
689689
elog(ERROR, "%s", errmsg);
690690
else
691-
elog(ERROR, "Failed to read from remote file '%s'", from_fullpath);
691+
elog(ERROR, "Failed to read from remote file \"%s\"", from_fullpath);
692692
}
693693

694694
file->read_size = rc * BLCKSZ;
@@ -710,16 +710,16 @@ backup_data_file(ConnectionArgs* conn_arg, pgFile *file,
710710
{
711711
if (missing_ok)
712712
{
713-
elog(LOG, "File '%s' is not found", from_fullpath);
713+
elog(LOG, "File \"%s\" is not found", from_fullpath);
714714
file->write_size = FILE_NOT_FOUND;
715715
goto cleanup;
716716
}
717717
else
718-
elog(ERROR, "File '%s' is not found", from_fullpath);
718+
elog(ERROR, "File \"%s\" is not found", from_fullpath);
719719
}
720720

721721
/* In all other cases throw an error */
722-
elog(ERROR, "Cannot open file '%s': %s",
722+
elog(ERROR, "Cannot open file \"%s\": %s",
723723
from_fullpath, strerror(errno));
724724
}
725725

@@ -802,12 +802,12 @@ backup_data_file(ConnectionArgs* conn_arg, pgFile *file,
802802

803803
/* close local input file */
804804
if (in && fclose(in))
805-
elog(ERROR, "Cannot close the source file '%s': %s",
805+
elog(ERROR, "Cannot close the source file \"%s\": %s",
806806
to_fullpath, strerror(errno));
807807

808808
/* close local output file */
809809
if (out && fclose(out))
810-
elog(ERROR, "Cannot close the backup file '%s': %s",
810+
elog(ERROR, "Cannot close the backup file \"%s\": %s",
811811
to_fullpath, strerror(errno));
812812

813813
pg_free(in_buf);
@@ -1271,12 +1271,12 @@ backup_non_data_file_internal(const char *from_fullpath,
12711271
/* open backup file for write */
12721272
out = fopen(to_fullpath, PG_BINARY_W);
12731273
if (out == NULL)
1274-
elog(ERROR, "Cannot open destination file '%s': %s",
1274+
elog(ERROR, "Cannot open destination file \"%s\": %s",
12751275
to_fullpath, strerror(errno));
12761276

12771277
/* update file permission */
12781278
if (chmod(to_fullpath, file->mode) == -1)
1279-
elog(ERROR, "Cannot change mode of '%s': %s", to_fullpath,
1279+
elog(ERROR, "Cannot change mode of \"%s\": %s", to_fullpath,
12801280
strerror(errno));
12811281

12821282
/* backup remote file */
@@ -1291,21 +1291,21 @@ backup_non_data_file_internal(const char *from_fullpath,
12911291
/* maybe deleted, it's not error in case of backup */
12921292
if (missing_ok)
12931293
{
1294-
elog(LOG, "File '%s' is not found", from_fullpath);
1294+
elog(LOG, "File \"%s\" is not found", from_fullpath);
12951295
file->write_size = FILE_NOT_FOUND;
12961296
goto cleanup;
12971297
}
12981298
else
1299-
elog(ERROR, "File '%s' is not found", from_fullpath);
1299+
elog(ERROR, "File \"%s\" is not found", from_fullpath);
13001300
}
13011301
else if (rc == WRITE_FAILED)
1302-
elog(ERROR, "Cannot write to '%s': %s", to_fullpath, strerror(errno));
1302+
elog(ERROR, "Cannot write to \"%s\": %s", to_fullpath, strerror(errno));
13031303
else if (rc != SEND_OK)
13041304
{
13051305
if (errmsg)
13061306
elog(ERROR, "%s", errmsg);
13071307
else
1308-
elog(ERROR, "Cannot access remote file '%s'", from_fullpath);
1308+
elog(ERROR, "Cannot access remote file \"%s\"", from_fullpath);
13091309
}
13101310

13111311
pg_free(errmsg);
@@ -1322,15 +1322,15 @@ backup_non_data_file_internal(const char *from_fullpath,
13221322
{
13231323
if (missing_ok)
13241324
{
1325-
elog(LOG, "File '%s' is not found", from_fullpath);
1325+
elog(LOG, "File \"%s\" is not found", from_fullpath);
13261326
file->write_size = FILE_NOT_FOUND;
13271327
goto cleanup;
13281328
}
13291329
else
1330-
elog(ERROR, "File '%s' is not found", from_fullpath);
1330+
elog(ERROR, "File \"%s\" is not found", from_fullpath);
13311331
}
13321332

1333-
elog(ERROR, "Cannot open file '%s': %s", from_fullpath,
1333+
elog(ERROR, "Cannot open file \"%s\": %s", from_fullpath,
13341334
strerror(errno));
13351335
}
13361336

@@ -1347,13 +1347,13 @@ backup_non_data_file_internal(const char *from_fullpath,
13471347
read_len = fread(buf, 1, CHUNK_SIZE, in);
13481348

13491349
if (ferror(in))
1350-
elog(ERROR, "Cannot read from file '%s': %s",
1350+
elog(ERROR, "Cannot read from file \"%s\": %s",
13511351
from_fullpath, strerror(errno));
13521352

13531353
if (read_len > 0)
13541354
{
13551355
if (fwrite(buf, 1, read_len, out) != read_len)
1356-
elog(ERROR, "Cannot write to file '%s': %s", to_fullpath,
1356+
elog(ERROR, "Cannot write to file \"%s\": %s", to_fullpath,
13571357
strerror(errno));
13581358

13591359
/* update CRC */
@@ -1376,10 +1376,10 @@ backup_non_data_file_internal(const char *from_fullpath,
13761376
FIN_FILE_CRC32(true, file->crc);
13771377

13781378
if (in && fclose(in))
1379-
elog(ERROR, "Cannot close the file '%s': %s", from_fullpath, strerror(errno));
1379+
elog(ERROR, "Cannot close the file \"%s\": %s", from_fullpath, strerror(errno));
13801380

13811381
if (out && fclose(out))
1382-
elog(ERROR, "Cannot close the file '%s': %s", to_fullpath, strerror(errno));
1382+
elog(ERROR, "Cannot close the file \"%s\": %s", to_fullpath, strerror(errno));
13831383

13841384
pg_free(buf);
13851385
}

0 commit comments

Comments
 (0)