At 11:35 PM -0500 8/30/07, John E. Malmberg wrote: >The attached patch file_path_pm.gdiff handles a special case of a filename >named "." on VMS that is not a directory. If rmtree() is called on a >directory with this present, it causes an infinite recursion.
Good catch. >It looks like this could be done more efficiently by moving the common code >into a subroutine, but this gets the the immediate problem fixed. Well, frankly it looks unnecessarily complex. I've checked #31775 into blead instead, which really only adds one line of new code. It seems to do the trick just fine for me, but let me know if you have any trouble with it. However, File::Path is now pretty different from what's in blead, so the attached patch is against 2.00_09. There we had the additional problem that C<-d _> depends on whatever was most recently stat()ed successfully inside of catdir, and that might have been a directory even when catdir fails to return a directory. So I moved the lstat down to where its result is what the magic underscore sees rather than whatever happened or didn't happen inside of catdir. That means we will do a catdir in some cases where we don't use its result, but we can probably live with that. -- ________________________________________ Craig A. Berry mailto:[EMAIL PROTECTED] "... getting out of a sonnet is much more difficult than getting in." Brad Leithauser
rmtree.patch
Description: Binary data