David Roundy wrote:
> On Thu, Sep 25, 2008 at 12:42:49PM -0700, Dmitry Kurochkin wrote:
>> Thu Sep 25 21:57:11 MSD 2008  Dmitry Kurochkin <[EMAIL PROTECTED]>
>>   * Make FileName.drop_dotdot work with absolute paths.
>>
>> Thu Sep 25 21:57:26 MSD 2008  Dmitry Kurochkin <[EMAIL PROTECTED]>
>>   * Resolve issue1078: make ioAbsolute work with symbolic links in file 
>> paths.
>>
>> Thu Sep 25 22:01:03 MSD 2008  Dmitry Kurochkin <[EMAIL PROTECTED]>
>>   * Move issue1078 test from bugs to tests.
>>
>> Thu Sep 25 23:39:53 MSD 2008  Dmitry Kurochkin <[EMAIL PROTECTED]>
>>   * Rewrite ioAbsolute using System.Directory.canonicalizePath.
> 
> I got around to reading the code for canonicalizePath, and it turns
> out to correspond to an OS function on Windows that doesn't seem to do
> what we want at all.  Rejected.  And in the future, if you'd avoid
> using undocumented library functions, I wouldn't have had to go to the
> trouble of reading Microsoft documentation.
> 
> For the curious, it seems from the documentation that using
> canonicalizePath will cause a regression in precisely issue1078 on
> windows.  If not, then we're relying on undocumented behavior of a
> Microsoft function called by an undocumented base library function,
> which still seems highly fishy.  On posix systems, canonicalizePath
> calles realpath, which isn't very well documented, but at least seems
> to be designed to do what we want (and apparently even works, on
> Dmitry's system).  There's no documentation that I can find indicating
> what realpath does when given a path describing a nonexistent file or
> directory, but we could always hope that it does what we want.

System.Directory.canonicalizePath doesn't have deterministic behaviour, 
so I imagine you're right to avoid using it on that basis (but I don't 
know exactly what you're trying to use it for).

BTW, I haven't followed the whole thread, but I hope you're taking into 
account the fact that "foo/../bar" /= "bar" on POSIX systems, due to 
symlinks.

Cheers,
        Simon

_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to