Hi Corinna,

On Mon, 3 Jul 2023, Corinna Vinschen wrote:

> Hi Johannes,
>
> On Jun 27 22:51, Johannes Schindelin wrote:
> > In 4b8222983f (Cygwin: fix errno values set by readlinkat, 2023-04-18)
> > the code of `readlinkat()` was adjusted to align the `errno` with Linux'
> > behavior.
> >
> > To accommodate for that, the `gen_full_path_at()` function was modified,
> > and the caller was adjusted to expect either `ENOENT` or `ENOTDIR` in
> > the case of an empty `pathname`, not just `ENOENT`.
> >
> > However, `readlinkat()` is not the only caller of that helper function.
> >
> > And while most other callers simply propagate the `errno` produced by
> > `gen_full_path_at()`, two other callers also want to special-case empty
> > `pathnames` much like `readlinkat()`: `fchmodat()` and `fstatat()`.
> >
> > Therefore, these two callers need to be changed to expect `ENOTDIR` in
> > case of an empty `pathname`, too.
> >
> > Signed-off-by: Johannes Schindelin <johannes.schinde...@gmx.de>
>
> Looks like a good catch. Can you please also add a "Fixes:" tag line
> and move the tar error description up into the commit message?

Done.

BTW a colleague and I were wondering whether we really want to set
`errno=ENOTDIR` in `gen_full_path_at()` for empty paths when
`AT_EMPTY_PATH` is _not_ specified. As far as we can tell, Linux sets
`errno=ENOENT` in that instance.

Ciao,
Johannes

Reply via email to