This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: native symlink
- From: Jeffrey Altman <jaltman at openafs dot org>
- To: cygwin-developers at cygwin dot com
- Date: Thu, 11 Apr 2013 17:55:30 -0400
- Subject: Re: native symlink
- References: <20130401195216 dot GA7174 at ednor dot casa dot cgf dot cx> <9A868E84-96C2-486C-98DF-3FF5079ACD50 at mac dot com> <20130402000633 dot GA3977 at ednor dot casa dot cgf dot cx> <9362C76C-DB6B-4DA8-B61E-7980CFDF7A8A at mac dot com> <20130403014056 dot GA3383 at ednor dot casa dot cgf dot cx> <2EC5409B-C507-4B41-862C-D42D69CE3741 at mac dot com> <515BB10C dot 9080101 at openafs dot org> <20130403152907 dot GD2468 at calimero dot vinschen dot de> <515C5E4F dot 3050406 at openafs dot org> <20130403172929 dot GI2468 at calimero dot vinschen dot de> <20130403204641 dot GB25170 at calimero dot vinschen dot de>
- Reply-to: jaltman at openafs dot org
Corinna,
Sorry for the delay in testing but I can now confirm that this patch
corrects the behavior in which the wrong status information was being
used.
Jeffrey Altman
On 4/3/2013 4:46 PM, Corinna Vinschen wrote:
> You're set up to build Cygwin yourself, right? Can you please try the
> below patch?
>
>
> Thanks,
> Corinna
>
>
> Index: path.cc
> ===================================================================
> RCS file: /cvs/src/src/winsup/cygwin/path.cc,v
> retrieving revision 1.672
> diff -u -p -r1.672 path.cc
> --- path.cc 3 Apr 2013 11:20:36 -0000 1.672
> +++ path.cc 3 Apr 2013 20:46:08 -0000
> @@ -2668,7 +2668,14 @@ restart:
> to the volumes root dir. */
> pflags &= ~PC_KEEP_HANDLE;
> }
> - else if (res)
> + else if (!res)
> + {
> + /* Make sure the open handle is not used in later stat calls.
> + We didn't recognize the reparse point type, so let the
> + OS handle this the default way. */
> + pflags &= ~PC_KEEP_HANDLE;
> + }
> + else
> {
> /* A symlink is never a directory. */
> conv_hdl.fnoi ()->FileAttributes &= ~FILE_ATTRIBUTE_DIRECTORY;
>