Something's weird about System.Directory.removeDirectoryRecursive

Brandon Allbery allbery.b at
Thu Feb 9 23:24:46 CET 2012

On Thu, Feb 9, 2012 at 17:02, Ian Lynagh <igloo at> wrote:

> On Fri, Jan 27, 2012 at 11:48:33PM -0800, John Millikin wrote:
> > Now, there is one case where this function *will* follow symlinks.
> > However, I believe it is a bug because it produces odd behavior:
> I think this is an oddity in how symlinks to directories are treated.
> You can remove one with removeFile but not removeDirectory, but
> doesFileExist returns False and doesDirectoryExist returns True.

You probably don't want to use doesDirectoryExist directly here; C programs
in this situation use lstat() instead of stat() to check for symlinks, but
in the general case you want doesDirectoryExist to use stat() as it
currently does.

brandon s allbery                                      allbery.b at
wandering unix systems administrator (available)     (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Libraries mailing list