From a9643c80c3a9ddbde4f6d382b0b63081ca3b74f9 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Thu, 24 Oct 2013 22:45:43 +0200 Subject: [PATCH] // bad commit sorry --- controllers/admin/AdminAttachmentsController.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/controllers/admin/AdminAttachmentsController.php b/controllers/admin/AdminAttachmentsController.php index 16c8d2f4c..9da241cf7 100644 --- a/controllers/admin/AdminAttachmentsController.php +++ b/controllers/admin/AdminAttachmentsController.php @@ -151,7 +151,6 @@ class AdminAttachmentsControllerCore extends AdminController ); else { - do $uniqid = sha1(microtime()); while (file_exists(_PS_DOWNLOAD_DIR_.$uniqid)); if (!copy($_FILES['file']['tmp_name'], _PS_DOWNLOAD_DIR_.$uniqid)) @@ -182,7 +181,7 @@ class AdminAttachmentsControllerCore extends AdminController } $return = parent::postProcess(); if (!$return && isset($uniqid) && file_exists(_PS_DOWNLOAD_DIR_.$uniqid)) - @unlink(_PS_DOWNLOAD_DIR_.$uniqid); + unlink(_PS_DOWNLOAD_DIR_.$uniqid); return $return; } }