[sane-devel] Problems porting to cygwin

Matthew Duggan stauff@guarana.org
Thu, 6 Jun 2002 09:29:37 +1000


Hi,

Hard links in cygwin are emulated by the less-than-ideal method of
simply copying the file, ie:

stauff@BEEFCAKE ~/ctest
$ touch bog.txt

stauff@BEEFCAKE ~/ctest
$ ln bog.txt blah.txt

stauff@BEEFCAKE ~/ctest
$ ls -l
total 0
-rw-r--r--   1 stauff   None            0 Jun  6 09:26 blah.txt
-rw-r--r--   1 stauff   None            0 Jun  6 09:26 bog.txt

stauff@BEEFCAKE ~/ctest
$ echo "text" > bog.txt

stauff@BEEFCAKE ~/ctest
$ ls -l
total 1
-rw-r--r--   1 stauff   None            0 Jun  6 09:26 blah.txt
-rw-r--r--   1 stauff   None            5 Jun  6 09:26 bog.txt

stauff@BEEFCAKE ~/ctest
$

This breaks compatibility with some programs which require the hard-link
continuity, but works on FAT based drives which don't support hard
links.

Cheers,

Matthew Duggan


----- Original Message -----
From: "Sylvain Petreolle" <spetreolle@yahoo.fr>
To: <jim.george@blueyonder.co.uk>
Cc: "saned" <sane-devel@mostang.com>
Sent: Thursday, 6 June 2002 9:09 AM
Subject: Re: [sane-devel] Problems porting to cygwin


> > Sylvain,
> >
> > could you explain this a little further for me
> > please?
> >
> > Jim
> >
> No problem. Links don't exist in Windows.
> Why ? Because M$ wants to make dos/console mode
> disappear.
>
> There are only shortcuts, stored as name.lnk, that
> contain :
> - an icon (or path to the icon)
> - a path to the target
> - a comment.
>
> So the use of cygwin to simulate a link is :
> - empty icon (this would be meaningless)
> - empty path (this is not convenient as it is in
> C:\blah\blah\filename format)
> - store the unix path in the comment
> -> possible because any text can be stored in that
> place. don't remember how much the string can be long.
>
> ___________________________________________________________
> Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
> Yahoo! Mail : http://fr.mail.yahoo.com
> _______________________________________________
> Sane-devel mailing list
> Sane-devel@www.mostang.com
> http://www.mostang.com/mailman/listinfo/sane-devel
>