On Sun, Sep 26, 2010 at 13:36, Paul Moore <p.f.mo...@gmail.com> wrote: > Hmm, I can't find the one I was thinking of. GetLongFileName correctly > sets the case of all but the final part, and FindFile can be used to > find the last part, but that's not what I recall. > > GetFinalPathNameByHandle works, and is documented to do so, but (a) it > works on an open file handle, so you need to open the file, and (b) > it's Vista and later only...
FWIW, here's what Mercurial uses to get the real path name on Windows: http://hg.intevation.org/mercurial/crew/file/66a07fb76ceb/mercurial/util.py#l633 (I don't know much about that code or this topic, but maybe someone finds it useful. It doesn't use any "special" Windows API, so if there is any, it's something the hg hackers don't know about.) Cheers, Dirkjan _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com