Tue Dec 13 06:00:39 2011: Request 73228 was acted upon. Transaction: Ticket created by AJGB Queue: PAR-Dist Subject: verifying fails to remove temp dir Broken in: 0.47, 0.48 Severity: Important Owner: Nobody Requestors: a...@cpan.org Status: new Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=73228 >
Hi, _verify_or_sign calls _unzip_to_tmpdir which chdir to temp directory, however changing back to previouse cwd is done after rmtree is called causing following error: cannot remove path when cwd is /tmp/parXXXXX for /tmp/parXXXXX: at /usr/local/nagios/perl/lib/PAR/Dist.pm Patch attached. Thanks, Alex
diff -ru PAR-Dist-0.48-orig/lib/PAR/Dist.pm PAR-Dist-0.48/lib/PAR/Dist.pm --- PAR-Dist-0.48-orig/lib/PAR/Dist.pm 2011-11-05 11:00:28.000000000 +0000 +++ PAR-Dist-0.48/lib/PAR/Dist.pm 2011-12-13 10:52:51.424730433 +0000 @@ -1085,9 +1085,10 @@ my $rv = Module::Signature->can($action)->(%args); _zip(dist => $dist) if $action eq 'sign'; - File::Path::rmtree([$tmpdir]); chdir($cwd); + File::Path::rmtree([$tmpdir]); + return $rv; }