X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_33 X-Spam-Check-By: sourceware.org Message-ID: <617861.50861.qm@web24204.mail.ird.yahoo.com> Date: Thu, 3 Sep 2009 12:57:33 +0000 (GMT) From: alf salte Subject: problems with symbolic links To: cygwin AT cygwin DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com My setup: I have a network drive seen in windows as S: and has file type NTFS. Actual= ly, the file system is ext3 but it seems the software on the network drive = makes it appear as NTFS to windows - properties in windows describe it as N= TFS. In cygwin this is seen as /cygdrive/s and when I try to create a symbolic l= ink on the drive it appears to be working correctly: ln -s foo bar creates a symbolic link bar.lnk that contains a reference to the file foo. The problem is when I try to use this symbolic link. For one thing, scripts= that then try to open bar get a surprise since the filename is really bar.= lnk but worse is the fact that neither bar nor bar.lnk opens up foo. less b= ar just report file not found and less bar.lnk simply opens the link and du= mps out the binary data in it where one of the fields contain the file foo. What am I doing wrong? I did see that there was some problem if you did not= have the drive mounted as "system" but the drive /cygdrive/s is mounted as= (remote,system) so I am at a loss as to what is wrong. Would appreciate any help in the matter. As it is, any installation script = or make script that make a link "ln -s foo.c bar.c" will not be able to use= 'bar.c' to refer to the file and gcc does not understand that bar.c.lnk is= supposed to be a C source file - nor is it a C source file since it is a l= ink etc etc. Also, ls -l does not report the file as 'l' in the first chara= cter, it reports the link as a regular file. Is there a bug in fstat()? I would guess that open("foo",..) should check if the file "foo" is not fou= nd, if there is a file "foo.lnk" and then open that file and find the file = it references etc. Not sure exactly how or where this is handled in the co= de. Checking cygwin.dll source code there is a path name resolver class and= it does appear to add a ".lnk" extension but it appears to only apply to d= irectory names in a path and not sure exactly under which conditions that c= ode is enabled from a regular open() function. Alf _________________________________________________________ Alt i ett. F=E5 Yahoo! Mail med adressekartotek, kalender og notisblokk. http://no.mail.yahoo.com -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple