diff --git a/apps/files_external/lib/swift.php b/apps/files_external/lib/swift.php index 208b28e44229..b643226de329 100644 --- a/apps/files_external/lib/swift.php +++ b/apps/files_external/lib/swift.php @@ -135,7 +135,11 @@ private function fetchObject($path) { } /** + * Returns whether the given path exists. + * * @param string $path + * + * @return bool true if the object exist, false otherwise */ private function doesObjectExist($path) { return $this->fetchObject($path) !== false; @@ -181,6 +185,8 @@ public function mkdir($path) { $metadataHeaders = DataObject::stockHeaders(array()); $allHeaders = $customHeaders + $metadataHeaders; $this->getContainer()->uploadObject($path, '', $allHeaders); + // invalidate so that the next access gets the real object + // with all properties $this->objectCache->remove($path); } catch (Exceptions\CreateUpdateError $e) { \OCP\Util::writeLog('files_external', $e->getMessage(), \OCP\Util::ERROR);