- Notifications
You must be signed in to change notification settings - Fork28
Commit82e8018
committed
Teach pg_ls_dir_files() to ignore ENOENT failures from stat().
Buildfarm experience shows that this function can fail with ENOENTif some other process unlinks a file between when we read the directoryentry and when we try to stat() it. The problem is old but we hadnot noticed it until085b6b6 added regression test coverage.To fix, just ignore ENOENT failures. There is one other case thatthis might hide: a symlink that points to nowhere. That seems okaythough, at least better than erroring.Back-patch to v10 where this function was added, since the regressiontest cases were too.Discussion:https://postgr.es/m/20200308173103.GC1357@telsasoft.com1 parent70dc4c5 commit82e8018
1 file changed
+5
-0
lines changedLines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
597 | 597 |
| |
598 | 598 |
| |
599 | 599 |
| |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
600 | 604 |
| |
601 | 605 |
| |
602 | 606 |
| |
| 607 | + | |
603 | 608 |
| |
604 | 609 |
| |
605 | 610 |
| |
|
0 commit comments
Comments
(0)