From 1aa00e8ee5e22980f65c55dcdb96430ab613e867 Mon Sep 17 00:00:00 2001 From: Matt Shin Date: Tue, 17 May 2016 12:30:55 +0100 Subject: [PATCH] admin backup: fix temporary work location Use default temporary directory instead of destination directory as temporary work area. --- lib/FCM/Admin/System.pm | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/lib/FCM/Admin/System.pm b/lib/FCM/Admin/System.pm index cdee7142..d8738bd2 100644 --- a/lib/FCM/Admin/System.pm +++ b/lib/FCM/Admin/System.pm @@ -275,11 +275,7 @@ sub backup_svn_repository { } my $base_name = $project->get_svn_base_name(); run_mkpath($CONFIG->get_svn_backup_dir()); - my $work_dir = tempdir( - "$base_name.backup.XXXXXX", - DIR => $CONFIG->get_svn_backup_dir(), - CLEANUP => 1, - ); + my $work_dir = tempdir("$base_name.backup.XXXXXX", CLEANUP => 1); my $work_path = catfile($work_dir, $base_name); $RUN->( sprintf( @@ -357,11 +353,7 @@ sub backup_trac_environment { my $trac_live_path = $project->get_trac_live_path(); my $base_name = $project->get_name(); run_mkpath($CONFIG->get_trac_backup_dir()); - my $work_dir = tempdir( - "$base_name.backup.XXXXXX", - DIR => $CONFIG->get_trac_backup_dir(), - CLEANUP => 1, - ); + my $work_dir = tempdir("$base_name.backup.XXXXXX", CLEANUP => 1); my $work_path = catfile($work_dir, $base_name); $RUNNER->run_with_retries( sprintf(