public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Oskar Skog <oskar@oskog97.com>
To: cygwin@cygwin.com
Subject: Re: Deleting a directory with the same name as a shortcut deletes everything in CWD
Date: Tue, 9 Aug 2022 23:01:14 +0300	[thread overview]
Message-ID: <4f214d07-fc9b-ab8e-ee39-a686af5ca053@oskog97.com> (raw)
In-Reply-To: <b1090ef6-9f8e-bcf9-6d99-799d16340571@cornell.edu>


[-- Attachment #1.1.1: Type: text/plain, Size: 651 bytes --]

On 2022-08-09 22:52, Ken Brown wrote:
> I think the best fix is to set res = 0 at the beginning of the loop and 
> to remove a "res = -1" that occurs later.  I've sent a patch to 
> cygwin-patches.
> 
> Ken
> 

 From https://cygwin.com/pipermail/cygwin-patches/2022q3/011994.html
 > Currently it is possible for symlink_info::check to return -1 in case
 > we're searching for foo and find foo.lnk that is not a shortcut.

Does it matter that it is *not* a shortcut for this patch to work?

I first experienced this issue using an actual shortcut, but simplified
the reproduction code.

mkshortcut -n Foo.lnk ...   ->  touch Foo.lnk

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2485 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 665 bytes --]

  reply	other threads:[~2022-08-09 20:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-08 10:50 Oskar Skog
2022-08-08 11:56 ` Christian Franke
2022-08-08 23:29   ` Ken Brown
2022-08-09 19:52     ` Ken Brown
2022-08-09 20:01       ` Oskar Skog [this message]
2022-08-09 20:11         ` Ken Brown

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=4f214d07-fc9b-ab8e-ee39-a686af5ca053@oskog97.com \
    --to=oskar@oskog97.com \
    --cc=cygwin@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).