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.
This commit is contained in:
Christopher Bartz 2017-08-14 15:03:30 +02:00
parent 317521c7e7
commit bbd8797f1e
1 changed files with 1 additions and 6 deletions

View File

@ -74,11 +74,6 @@ class Swift extends \OC\Files\Storage\Common {
/** @var string */ /** @var string */
private $id; private $id;
/**
* @var array
*/
private static $tmpFiles = array();
/** /**
* Key value cache mapping path to data object. Maps path to * Key value cache mapping path to data object. Maps path to
* \OpenCloud\OpenStack\ObjectStorage\Resource\DataObject for existing * \OpenCloud\OpenStack\ObjectStorage\Resource\DataObject for existing
@ -617,7 +612,7 @@ class Swift extends \OC\Files\Storage\Common {
$fileData = fopen($tmpFile, 'r'); $fileData = fopen($tmpFile, 'r');
$this->getContainer()->uploadObject($path, $fileData); $this->getContainer()->uploadObject($path, $fileData);
// invalidate target object to force repopulation on fetch // invalidate target object to force repopulation on fetch
$this->objectCache->remove(self::$tmpFiles[$tmpFile]); $this->objectCache->remove($path);
unlink($tmpFile); unlink($tmpFile);
} }