Subject: | verifying fails to remove temp dir |
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
Subject: | PAR-Dist-0.48.patch |
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;
}