Deleting a directory with the same name as a shortcut deletes everything in CWD

Ken Brown
Tue Aug 9 20:11:38 GMT 2022

On 8/9/2022 4:01 PM, Oskar Skog wrote:
> 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
>  > 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

It still works.  I'll fix the commit message.  [The code in question is actually 
checking whether foo.lnk is a shortcut that Cygwin treats as a symlink.]


More information about the Cygwin mailing list