pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix lstat() for broken junction points on Windows.
Date: Tue, 25 Oct 2022 03:29:42 +0000
Message-ID: <E1onAdK-000gsy-A1@gemulon.postgresql.org> (raw)

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(-)



view thread (4+ messages)  latest in thread

Message-ID: <E1onAdK-000gsy-A1@gemulon.postgresql.org>
Permalink:  ../E1onAdK-000gsy-A1@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1onAdK-000gsy-A1@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tmunro@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix lstat() for broken junction points on Windows.
  In-Reply-To: <E1onAdK-000gsy-A1@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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