From c6449b48255bcb60de271114c008df724f78d82c Mon Sep 17 00:00:00 2001
From: Fyorl <gaelreth@gmail.com>
Date: Tue, 14 Aug 2012 13:31:33 +0100
Subject: [feature/attach-dl] Added $archive_path

PHPBB3-11042
---
 phpBB/download/file.php | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

(limited to 'phpBB')

diff --git a/phpBB/download/file.php b/phpBB/download/file.php
index d33e1723ca..8342ed0d61 100644
--- a/phpBB/download/file.php
+++ b/phpBB/download/file.php
@@ -356,14 +356,15 @@ else
 
 	$store_name = 'att_' . time() . '_' . unique_id();
 	$archive_name = 'attachments' . $suffix;
+	$archive_path = "{$phpbb_root_path}store/{$store_name}{$archive}";
 
 	if ($archive === '.zip')
 	{
-		$compress = new compress_zip('w', "{$phpbb_root_path}store/{$store_name}{$archive}");
+		$compress = new compress_zip('w', $archive_path);
 	}
 	else
 	{
-		$compress = new compress_tar('w', "{$phpbb_root_path}store/{$store_name}{$archive}", $archive);
+		$compress = new compress_tar('w', $archive_path, $archive);
 	}
 
 	$extensions = array();
@@ -397,7 +398,7 @@ else
 		$compress->download($store_name, $archive_name);
 	}
 
-	unlink("{$phpbb_root_path}store/{$store_name}{$archive}");
+	unlink($archive_path);
 
 	if ($files_added < 1)
 	{
-- 
cgit v1.2.1