From c94c97db6c980592aef3f1b4b73a90a8b4ecc47a Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Sun, 11 Jul 2010 23:11:08 +0100 Subject: [PATCH] edit: Clean up temporary files. Note to self: The 'tempfile' function does *not* default to removing files with the program exits! For stable-1.4 branch: - Cherry picked from commit 10ea14a3f1adb7023dd0601e4759bd24a030a1c3 - Rebased --- tools/virt-edit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virt-edit b/tools/virt-edit index e00e4cf..ca8e576 100755 --- a/tools/virt-edit +++ b/tools/virt-edit @@ -139,7 +139,7 @@ my $root_dev = $roots[0]; my $os = $oses->{$root_dev}; mount_operating_system ($g, $os, 0); -my ($fh, $tempname) = tempfile (); +my ($fh_not_used, $tempname) = tempfile (UNLINK => 1); # Allow this to fail in case eg. the file does not exist. $g->download($filename, $tempname); -- 1.8.3.1