This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: native symlink support should fallback to default format if target missing
- From: James Gregurich <bayoubengal at mac dot com>
- To: "cygwin-developers at cygwin dot com" <cygwin-developers at cygwin dot com>
- Cc: "cygwin-developers at cygwin dot com" <cygwin-developers at cygwin dot com>
- Date: Tue, 14 May 2013 15:04:22 -0600
- Subject: Re: native symlink support should fallback to default format if target missing
- References: <B225793A-09C6-4E2C-B257-5A7FAF7E990E at mac dot com> <56151889-406D-4648-BFC9-BEE3AE70D56E at mac dot com> <20130513150046 dot GB20319 at calimero dot vinschen dot de> <519105F5 dot 2080101 at openafs dot org> <20130513154007 dot GE8890 at calimero dot vinschen dot de> <20130513185937 dot GA1601 at ednor dot casa dot cgf dot cx> <CA+sc5mkQEQe0CyagMqyzH2i2A1KtAk4fJwr=v_y0+RrcXqNv7A at mail dot gmail dot com> <4A874440-F98D-4CC2-B6BB-F8D04CF99266 at mac dot com> <20130514150435 dot GD23910 at calimero dot vinschen dot de> <51925E4A dot 4000302 at openafs dot org> <20130514160720 dot GA4314 at calimero dot vinschen dot de>
>>
>>
>> 4. if a cygwin symlink is accessed and the target exists and the
>> file system supports symlink reparse points, replace the cygwin
>> symlink with the symlink reparse point.
>
> No, that won't happen. When reading a symlink it will be used, not
> overwritten with another one under some weird circumstances.
> Consider:
>
> $ export CYGWIN=winsymlinks:native
> $ ln -s foo bar
> $ [... doing some other unrelated stuff, forgetting to unset CYGWIN...]
> $ find . -name baz
>
> This will accidentally read all symlinks under CWD and convert them to
> native symlinks. Nope, not good.
You don't need to do that. Just leave it as a native default form symlink. One can use a command line tool to test the symlink and retry the creation of the native symlink at a later time. That works in practical use.