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: Earnie Boyd <earnie at users dot sourceforge dot net>
- Cc: "cygwin-developers at cygwin dot com" <cygwin-developers at cygwin dot com>
- Date: Tue, 14 May 2013 08:52:09 -0600
- Subject: Re: native symlink support should fallback to default format if target missing
- References: <517F061D dot 5080201 at cygwin dot com> <671E245A-BDCD-4F46-90B7-9E73301126C1 at mac dot com> <20130430002548 dot GA7635 at ednor dot casa dot cgf dot cx> <9FCBD602-2D9C-4069-AA5F-682C32DE6D32 at mac dot com> <517F13D1 dot 8040105 at cwilson dot fastmail dot fm> <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>
>>
>
> I agree with Chris on this. Instead of a fallback behavior it should
> be an EACCES, EINVAL or EXDEV error.
>
> --
> Earnie
> -- https://sites.google.com/site/earnieboyd
This may sound rational from a theoretical perspective, but for practical use of the system, it is not good. Consider the case when one clones a git repository. The link will often be created before the target file exists. If the system fails with an error, then you won't be able to use your git working tree as the checkout won't be successful.
Output a warning if you like, but the call to make the link needs to succeed so that unix software works correctly.
Outputting a broken link would be more confusing for a user than outputting a default form symlink. An experienced user of windows and Cygwin will typically have the sophistication to know how to recognize the cygwin symlink file in the file system. After all. The system has already been doing this behavior for years and people have seen it. Also, the system is not on by default. People who enable native symlink support can be expected to have the sophistication to understand the details of using it.
-James