This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Native symbolic links to non-existent targets (possible bug?)


Looking at the source, I may be able to address my own questions/points.

On 09/29/2014 10:21 PM, Brian Ericson wrote:
Cygwin appears to ignore "winsymlinks:native" when asked to create a
symbolic link to a non-existent target, reverting to its "magic header"
approach.
This is true...
Shouldn't Cygwin honor "winsymlinks:native" even with the target does
not exist?
According to the following comment at line 1646 of path.cc (see https://cygwin.com/viewvc/src/winsup/cygwin/path.cc?view=markup#l1646):

  /* If the symlink target doesn't exist, don't create native symlink.
     Otherwise the directory flag in the symlink is potentially wrong
     when the target comes into existence, and native tools will fail.
     This is so screwball. This is no problem on AFS, fortunately. */

no, it can't/shouldn't honor the "native" designation when the target doesn't exist, because it can't be assume the to-be-born target will be born as a file or a directory, and this matters to Windows.

I wonder... Is there a way to determine in Cygwin (in the (bash) shell) if the symbolic link is native or not?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]