Skip to content

Commit 3fdc1d2

Browse files
committed
C comment: mention why no setting lasterrno in dir_existsfile()
Reported-by: Wei Sun Discussion: https://postgr.es/m/tencent_1276C08F98579CC19D8A4488C848A8411806@qq.com Backpatch-through: master
1 parent b706172 commit 3fdc1d2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/bin/pg_basebackup/walmethods.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,11 @@ dir_existsfile(WalWriteMethod *wwmethod, const char *pathname)
594594

595595
fd = open(tmppath, O_RDONLY | PG_BINARY, 0);
596596
if (fd < 0)
597+
598+
/*
599+
* Skip setting dir_data->lasterrno here because we are only checking
600+
* for existence.
601+
*/
597602
return false;
598603
close(fd);
599604
return true;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy