From d4013adf53fca69fdc36da858b10f59b880f07b4 Mon Sep 17 00:00:00 2001 From: Daniel Nichter Date: Wed, 8 May 2013 16:00:25 -0700 Subject: [PATCH] Remove only stage files. --- bin/pt-agent | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/pt-agent b/bin/pt-agent index a4928463..7ff66375 100755 --- a/bin/pt-agent +++ b/bin/pt-agent @@ -6271,9 +6271,9 @@ sub run_service { $exit_status |= $cmd_exit_status; } - # Remove tmp output files. - foreach my $file ( @output_files ) { - next unless defined $file && -f $file; + # Remove staged files. Anything to save should have been moved + # from staging by a task. + foreach my $file ( glob "$tmp_dir/$prefix." . $service->name . ".*" ) { unlink $file or _warn("Error removing $file: $OS_ERROR"); }