<div class="gmail_quote">On Sun, Sep 26, 2010 at 06:36, Paul Moore <span dir="ltr">&lt;<a href="mailto:p.f.moore@gmail.com">p.f.moore@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 26 September 2010 09:01, Paul Moore &lt;<a href="mailto:p.f.moore@gmail.com">p.f.moore@gmail.com</a>&gt; wrote:<br>
&gt; On 25 September 2010 23:57, Greg Ewing &lt;<a href="mailto:greg.ewing@canterbury.ac.nz">greg.ewing@canterbury.ac.nz</a>&gt; wrote:<br>
&gt;&gt; Paul Moore wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; Windows has (I believe) user definable filesystems, too, but the OS<br>
&gt;&gt;&gt; has &quot;get me the real filename&quot; style calls,<br>
&gt;&gt;<br>
&gt;&gt; Does it really, though? The suggestions I&#39;ve seen for doing<br>
&gt;&gt; this involve abusing the short/long filename translation<br>
&gt;&gt; machinery, and I&#39;m not sure they&#39;re guaranteed to return the<br>
&gt;&gt; actual case rather than something that happens to work.<br>
&gt;<br>
&gt; There&#39;s another call available. I&#39;ve been too lazy to go and look it<br>
&gt; up, but I&#39;ll do so sometime today.<br><br></div>
GetFinalPathNameByHandle works, and is documented to do so, but (a) it<br>
works on an open file handle, so you need to open the file, and (b)<br>
it&#39;s Vista and later only...</blockquote><div><br></div><div>FYI, this is currently exposed as nt._getfinalpathname, and is used for os.path.samefile on Vista and beyond.</div></div>