From c239df639bd61b9a6aff58092023d04361ae98d9 Mon Sep 17 00:00:00 2001 From: Jan Gerber Date: Fri, 20 Jul 2012 01:18:31 +0000 Subject: [PATCH] cleanup temp files left around by UploadStash stashFile renames files to add an extension, this way it is no longer cleaned up by php. So we have to unlink it after storing it in the FileRepo. Change-Id: Iab697fc4535546dd25231dddf220e18f3b0b73be --- includes/upload/UploadStash.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/upload/UploadStash.php b/includes/upload/UploadStash.php index 329ee22879..bbee0f5ba0 100644 --- a/includes/upload/UploadStash.php +++ b/includes/upload/UploadStash.php @@ -243,6 +243,9 @@ class UploadStash { } $stashPath = $storeStatus->value; + // we have renamed the file so we have to cleanup once done + unlink($path); + // fetch the current user ID if ( !$this->isLoggedIn ) { throw new UploadStashNotLoggedInException( __METHOD__ . ' No user is logged in, files must belong to users' ); -- 2.20.1