Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Unable to read history on latest Cygwin



On Mon, 14 Dec 2009, Peter Stephenson wrote:

"Peter A. Castro" wrote:
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.

I think that's rather more brittle: the code I've suggested (assuming it
does the trick) doesn't require anything more than that link() and
symlink() exist in the system library and covers any similar problem on
other systems.  Hacking something specific for any system isn't usually
desirable, plus all we've been told is that link() doesn't work on
FAT32, not that it doesn't work under Cygwin.

I'll apply your change and see what it does, though I'm a little
skeptical considering that symlinks are an artificial construct under
Cygwin.  Really they are application-level Windows Short-cut files and an
application needs to "understand" that that is what it is.  Cygwin does
interpret them, for Cygwin apps, but there have been some issues with
using them.  A quick test will tell all.

--
Peter A. Castro <doctor@xxxxxxxxxxxx> or <Peter.Castro@xxxxxxxxxx>
	"Cats are just autistic Dogs" -- Dr. Tony Attwood



Messages sorted by: Reverse Date, Date, Thread, Author