<div>I have a troublesome symlink that puts one of my programs into a loop</div><div><br></div><div>If I list the files in my troublesome directory I see this:</div><div><br></div><div><div>ls -l /Users/joe/projects/fuse/fuserl-2.0.5/fw</div>
<div>total 8</div><div>drwxr-xr-x@ 6 joe staff 204 Jul 23 2009 bin</div><div>drwxr-xr-x@ 3 joe staff 102 Jul 23 2009 build</div><div>drwxr-xr-x@ 19 joe staff 646 Jul 23 2009 m4</div><div>drwxr-xr-x@ 4 joe staff 136 Jul 23 2009 package</div>
<div>drwxr-xr-x@ 5 joe staff 170 Jul 23 2009 revision</div><div>drwxr-xr-x@ 9 joe staff 306 Jul 23 2009 sh</div><div>lrwxr-xr-x 1 joe staff 2 Oct 16 2011 share -> ..</div><div>drwxr-xr-x@ 7 joe staff 238 Jul 23 2009 template</div>
</div><div><br></div><div>So share is a link to '..' </div><div><br></div><div>But file:read_file_info thinks 'share' is a directory</div><div><br></div><div><br></div><div>-module(bug).</div><div>-compile(export_all).</div>
<div><br></div><div>-include_lib("kernel/include/file.hrl").</div><div><br></div><div>test() -></div><div> {ok, X} = file:read_file_info("/Users/joe/projects/fuse/fuserl-2.0.5/fw/share"),</div><div>
X#file_info.type.</div><div><br></div><div>Running this</div><div><br></div><div>> bug:test()</div><div>directory.</div><div><br></div><div>I'd expected this to return symlink</div><div><br></div><div>This is on a macbook OS X 10.8.3</div>
<div><br></div><div>Is this a bug, or have I misunderstood something</div><div><br></div><div>Cheers</div><div><br></div><div>/Joe</div><div><br></div><div><br></div>