mirror of
https://github.com/postgres/postgres.git
synced 2025-04-27 22:56:53 +03:00
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
This commit is contained in:
parent
b706172d22
commit
3fdc1d2693
@ -594,6 +594,11 @@ dir_existsfile(WalWriteMethod *wwmethod, const char *pathname)
|
||||
|
||||
fd = open(tmppath, O_RDONLY | PG_BINARY, 0);
|
||||
if (fd < 0)
|
||||
|
||||
/*
|
||||
* Skip setting dir_data->lasterrno here because we are only checking
|
||||
* for existence.
|
||||
*/
|
||||
return false;
|
||||
close(fd);
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user