On Mon, 14 Dec 2009, Peter Stephenson wrote:
On Mon, 14 Dec 2009 15:19:29 +0100
"Thorsten Kampe" <thorsten@xxxxxxxxxxxxxxxx> wrote:
"Hardlinks on FAT [...] have been faked in
1.5 by copying the file. The decision was made a couple of weeks back to
drop this fake since the application should know that the underlying
filesystem is not capable of creating hardlinks."
I presume that means symlink() works OK? We should probably be able to do
something relatively straightforward like the following---using exactly the
same code for symbolic links as hard links, most of the change is indenting
code---though I've only checked it to the extent that it doesn't screw up
somewhere that does support hard links.
There is another option to consider here: not using link().
The hist code has an alternative code path if link() is not available
(#ifdef HAVE_LINK), and it appears this is the only place in zsh code
which uses link(). I'm hacking configure to disable this usage on Cygwin
to see what, exactly, the difference in behaviour will be.