On Dec 10 22:33, Takashi Yano wrote:
> On Tue, 10 Dec 2024 14:23:36 +0100
> Corinna Vinschen wrote:
> > On Dec 10 22:10, Takashi Yano wrote:
> > > On Tue, 10 Dec 2024 14:00:53 +0100
> > > Corinna Vinschen wrote:
> > > > diff --git a/winsup/cygwin/local_includes/path.h 
> > > > b/winsup/cygwin/local_includes/path.h
> > > > index 3dd21d975abf..2a05cf44d40a 100644
> > > > --- a/winsup/cygwin/local_includes/path.h
> > > > +++ b/winsup/cygwin/local_includes/path.h
> > > > @@ -323,7 +323,7 @@ class path_conv
> > > >    }
> > > >    inline POBJECT_ATTRIBUTES init_reopen_attr (OBJECT_ATTRIBUTES &attr, 
> > > > HANDLE h)
> > > >    {
> > > > -    if (has_buggy_reopen ())
> > > > +    if (!h || has_buggy_reopen ())
> > > >        InitializeObjectAttributes (&attr, get_nt_native_path (),
> > > >                                   objcaseinsensitive (), NULL, NULL)
> > > >      else
> > > > -- 
> > > > 2.47.0
> > > > 
> > > 
> > > Thanks! Is your patch better than?
> > > +  if (pc.handle ())
> > > +    pc.init_reopen_attr (attr, pc.handle ());
> > > +  else
> > > +    pc.get_object_attr (attr, sec_none_nih);
> > 
> > Well, it fixes the problem once and for all, without having to
> > add a conditional in multiple places.
> 
> Ok. Then, the similar code at:
> sec/base.cc:61
> sec/base.cc:231
> can be simplified with your patch. Right?

Yes, indeed, thanks!  I'll add that to my patch.

I just have to go AFK for 2 hours or so, but will do this later today.


Thanks,
Corinna

Reply via email to