Fix lstat() for broken junction points on Windows.
Thomas Munro <tmunro@postgresql.org>
Fix lstat() for broken junction points on Windows. When using junction points to emulate symlinks on Windows, one edge case was not handled correctly by commit c5cb8f3b: if a junction point is broken (pointing to a non-existent path), we'd report ENOENT. This doesn't break any known use case, but was noticed while developing a test suite for these functions and is fixed here for completeness. Also add translation ERROR_CANT_RESOLVE_FILENAME -> ENOENT, as that is one of the errors Windows can report for some kinds of broken paths. Discussion: https://postgr.es/m/CA%2BhUKG%2BajSQ_8eu2AogTncOnZ5me2D-Cn66iN_-wZnRjLN%2Bicg%40mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/port/win32error.c | modified | +3 −0 |
| src/port/win32stat.c | modified | +22 −5 |
Discussion
- Understanding, testing and improving our Windows filesystem code 8 messages · 2022-10-18 → 2023-03-03