Subject: | Error 'closedir() attempted on invalid dirhandle PTH_DH' when deleting empty directory |
When calling pathrmdir($path,1) on a path that includes a directory
whose sole child is an empty directory, you will receive the error:
closedir() attempted on invalid dirhandle PTH_DH at
{path/to/Recursive.pm} line 318.
It appears to be caused by not localizing PTH_DH. I added the line
local(*PTH_DH); to pathempty() and the problem went away.
Perl version ActivePerl 5.8.8 build 822, F::C::Recursive version 0.35,
running under windows. Had the problem on both XP and W2K3 64 bit.
Patch attached
Subject: | Recursive.pm.patch |
300a301
> local(*PTH_DH);