From: H.Merijn Brand Date: Thu, 25 Oct 2007 09:17:22 +0000 (+0000) Subject: Emergency fix for /tmp dir cleanup's for smokers. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5a5ddb3422a731d9876c587363659d260db94e15;p=p5sagit%2Fp5-mst-13.2.git Emergency fix for /tmp dir cleanup's for smokers. Rest of the patch to sync CPANPLUS will follow later p4raw-id: //depot/perl@32191 --- diff --git a/lib/CPANPLUS/Internals/Source.pm b/lib/CPANPLUS/Internals/Source.pm index 49e0653..d1308f6 100644 --- a/lib/CPANPLUS/Internals/Source.pm +++ b/lib/CPANPLUS/Internals/Source.pm @@ -1252,7 +1252,11 @@ sub __update_custom_module_source { my $uri = join '/', $remote, $conf->_get_source('custom_index'); my $ff = File::Fetch->new( uri => $uri ); - my $dir = tempdir(); + + ### tempdir doesn't clean up by default, as opposed to tempfile() + ### so add it explicitly. + my $dir = tempdir( CLEANUP => 1 ); + my $res = do { local $File::Fetch::WARN = 0; local $File::Fetch::WARN = 0; $ff->fetch( to => $dir );