From: Aaron Schulz Date: Mon, 27 Feb 2012 23:00:32 +0000 (+0000) Subject: Dummy proof TempFSFile purging when the constructor is used directly to avoid data... X-Git-Tag: 1.31.0-rc.0~24480 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=aa61ae7ef72ef00556a1f26a0982b2af51e61ac1;p=lhc%2Fweb%2Fwiklou.git Dummy proof TempFSFile purging when the constructor is used directly to avoid data loss. --- diff --git a/includes/filerepo/backend/TempFSFile.php b/includes/filerepo/backend/TempFSFile.php index a9e51067fc..7843d6cd2a 100644 --- a/includes/filerepo/backend/TempFSFile.php +++ b/includes/filerepo/backend/TempFSFile.php @@ -11,7 +11,7 @@ * @ingroup FileBackend */ class TempFSFile extends FSFile { - protected $canDelete = true; // garbage collect the temp file + protected $canDelete = false; // bool; garbage collect the temp file /** @var Array of active temp files to purge on shutdown */ protected static $instances = array(); @@ -41,6 +41,7 @@ class TempFSFile extends FSFile { } } $tmpFile = new self( $path ); + $tmpFile->canDelete = true; // safely instantiated return $tmpFile; }