<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt">
<DIV>Thanks, that worked.</DIV>
<DIV> </DIV>
<DIV>Indy Singh<BR>IndigoSTAR Software -- www.indigostar.com</DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV style="FONT: 10pt tahoma">
<DIV><FONT size=3 face=Calibri></FONT> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=fulko.hew@gmail.com
href="mailto:fulko.hew@gmail.com">Fulko Hew</A> </DIV>
<DIV><B>Sent:</B> Saturday, April 28, 2012 8:59 AM</DIV>
<DIV><B>To:</B> <A title=indy@indigostar.com
href="mailto:indy@indigostar.com">Indy Singh</A> </DIV>
<DIV><B>Cc:</B> <A title=toronto-pm@pm.org
href="mailto:toronto-pm@pm.org">toronto-pm@pm.org</A> </DIV>
<DIV><B>Subject:</B> Re: [tpm] How determine the real directory
path</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV class=gmail_extra><BR><BR>
<DIV class=gmail_quote>On Sat, Apr 28, 2012 at 7:29 AM, Indy Singh <SPAN
dir=ltr><<A href="mailto:indy@indigostar.com"
target=_blank>indy@indigostar.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>
<DIV dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Calibri'; FONT-SIZE: 12pt">
<DIV>Hello all,</DIV>
<DIV> </DIV>
<DIV>I want to copy files from one directory to another where the directory
paths are something like:</DIV>
<DIV>/a/b/c to /x/y/z</DIV>
<DIV> </DIV>
<DIV>I need to detect if the two directory paths are identical after symbolic
links are resolved, in order to skip the file copy.</DIV>
<DIV> </DIV>
<DIV>Using File::Copy::copy sets $! to ‘No such file or directory’</DIV>
<DIV> </DIV>
<DIV>
<DIV>Using cp from a shell prompt gives an error like:</DIV>
<DIV>cp: `/a/b/c/foo.txt' and `/x/y/z/foo.txt' are the same
file<BR></DIV></DIV>
<DIV>
<DIV>Anyone have an idea how to resolve
this?</DIV></DIV></DIV></DIV></DIV></BLOCKQUOTE>
<DIV><BR>Can you use stat() to get the inodes of both directories to see if they
are the same?<BR><BR><BR></DIV></DIV></DIV></DIV></DIV></DIV></BODY></HTML>