From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin-patches@cygwin.com
Subject: Re: [PATCH] path_conv: do not get confused by a directory with `.lnk` suffix
Date: Tue, 18 Jan 2022 12:05:01 +0100 [thread overview]
Message-ID: <Yeae3ZsFhRZgo/gS@calimero.vinschen.de> (raw)
In-Reply-To: <e4230b2bc45903850a4007c6f556bffe1507cc9e.1642450788.git.johannes.schindelin@gmx.de>
On Jan 17 21:20, Johannes Schindelin wrote:
> When trying to create a directory called `xyz` in the presence of a
> directory `xyz.lnk`, the Cygwin runtime errors out with an `ENOENT`.
>
> The root cause is actually a bit deeper: the `symlink_info::check()`
> method tries to figure out whether the given path refers to a symbolic
> link as emulated via `.lnk` files, but since it is a directory, that is
> not the case, and that hypothesis is rejected.
>
> However, the `fileattr` field is not cleared, so that a later
> `.exists()` call on the instance mistakenly thinks that the symlink
> actually exists. Let's clear that field.
>
> This fixes https://github.com/msys2/msys2-runtime/issues/81
>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
> Published-As: https://github.com/dscho/msys2-runtime/releases/tag/dont-confuse-a-xyz.lnk-directory-for-a-lnk-file-cygwin-v1
> Fetch-It-Via: git fetch https://github.com/dscho/msys2-runtime dont-confuse-a-xyz.lnk-directory-for-a-lnk-file-cygwin-v1
>
> winsup/cygwin/path.cc | 1 +
> 1 file changed, 1 insertion(+)
Pushed with adeded "Cygwin:" tag in commit summary.
Thanks,
Corinna
prev parent reply other threads:[~2022-01-18 11:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-17 20:20 Johannes Schindelin
2022-01-18 11:05 ` Corinna Vinschen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yeae3ZsFhRZgo/gS@calimero.vinschen.de \
--to=corinna-cygwin@cygwin.com \
--cc=cygwin-patches@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).