From 222ec97f5fe458f6d4fe24b8cf2ec895d31bf076 Mon Sep 17 00:00:00 2001 From: Christopher Bartz Date: Mon, 14 Aug 2017 15:03:30 +0200 Subject: [PATCH] Remove tmpFiles Array in Swift.php tmpFiles Array is unnecessary and there has been a reference without an assignment which lead to a bug making swift external storage unuseable. --- apps/files_external/lib/Lib/Storage/Swift.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/apps/files_external/lib/Lib/Storage/Swift.php b/apps/files_external/lib/Lib/Storage/Swift.php index a55c3775b2..d32d6b3a19 100644 --- a/apps/files_external/lib/Lib/Storage/Swift.php +++ b/apps/files_external/lib/Lib/Storage/Swift.php @@ -74,11 +74,6 @@ class Swift extends \OC\Files\Storage\Common { /** @var string */ private $id; - /** - * @var array - */ - private static $tmpFiles = array(); - /** * Key value cache mapping path to data object. Maps path to * \OpenCloud\OpenStack\ObjectStorage\Resource\DataObject for existing @@ -617,7 +612,7 @@ class Swift extends \OC\Files\Storage\Common { $fileData = fopen($tmpFile, 'r'); $this->getContainer()->uploadObject($path, $fileData); // invalidate target object to force repopulation on fetch - $this->objectCache->remove(self::$tmpFiles[$tmpFile]); + $this->objectCache->remove($path); unlink($tmpFile); }