pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix lstat() for broken junction points on Windows. 4+ messages / 2 participants [nested] [flat]
* pgsql: Fix lstat() for broken junction points on Windows. @ 2022-10-25 03:29 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 4+ messages in thread From: Thomas Munro @ 2022-10-25 03:29 UTC (permalink / raw) To: pgsql-committers@lists.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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/387803d81d6256fcb60b9192bb5b00042442b4e3 Modified Files -------------- src/port/win32error.c | 3 +++ src/port/win32stat.c | 27 ++++++++++++++++++++++----- 2 files changed, 25 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix lstat() for broken junction points on Windows. @ 2024-11-07 23:19 Andrew Dunstan <andrew@dunslane.net> 0 siblings, 0 replies; 4+ messages in thread From: Andrew Dunstan @ 2024-11-07 23:19 UTC (permalink / raw) To: pgsql-committers@lists.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 (cherry picked from commit 387803d81d6256fcb60b9192bb5b00042442b4e3) Author: Thomas Munro <tmunro@postgresql.org> Author: Alexandra Wang <alexandra.wang.oss@gmail.com> Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/bb509a464e3e59e13b8869665fe5eccc98f83b39 Author: Thomas Munro <tmunro@postgresql.org> Modified Files -------------- src/port/win32error.c | 6 ++++++ src/port/win32stat.c | 27 ++++++++++++++++++++++----- 2 files changed, 28 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix lstat() for broken junction points on Windows. @ 2024-11-07 23:19 Andrew Dunstan <andrew@dunslane.net> 0 siblings, 0 replies; 4+ messages in thread From: Andrew Dunstan @ 2024-11-07 23:19 UTC (permalink / raw) To: pgsql-committers@lists.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 (cherry picked from commit 387803d81d6256fcb60b9192bb5b00042442b4e3) Author: Thomas Munro <tmunro@postgresql.org> Author: Alexandra Wang <alexandra.wang.oss@gmail.com> Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f2a4a137bb93922a925255665f5a47094ed8c9df Author: Thomas Munro <tmunro@postgresql.org> Modified Files -------------- src/port/win32error.c | 6 ++++++ src/port/win32stat.c | 27 ++++++++++++++++++++++----- 2 files changed, 28 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix lstat() for broken junction points on Windows. @ 2024-11-07 23:19 Andrew Dunstan <andrew@dunslane.net> 0 siblings, 0 replies; 4+ messages in thread From: Andrew Dunstan @ 2024-11-07 23:19 UTC (permalink / raw) To: pgsql-committers@lists.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 (cherry picked from commit 387803d81d6256fcb60b9192bb5b00042442b4e3) Author: Thomas Munro <tmunro@postgresql.org> Author: Alexandra Wang <alexandra.wang.oss@gmail.com> Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/8a5e4982f9c536fafa4ae9b7c331ee656ded2fe5 Author: Thomas Munro <tmunro@postgresql.org> Modified Files -------------- src/port/win32error.c | 6 ++++++ src/port/win32stat.c | 27 ++++++++++++++++++++++----- 2 files changed, 28 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2024-11-07 23:19 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-10-25 03:29 pgsql: Fix lstat() for broken junction points on Windows. Thomas Munro <tmunro@postgresql.org> 2024-11-07 23:19 pgsql: Fix lstat() for broken junction points on Windows. Andrew Dunstan <andrew@dunslane.net> 2024-11-07 23:19 pgsql: Fix lstat() for broken junction points on Windows. Andrew Dunstan <andrew@dunslane.net> 2024-11-07 23:19 pgsql: Fix lstat() for broken junction points on Windows. Andrew Dunstan <andrew@dunslane.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox