|
|
|
@ -65,7 +65,7 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common implements IChunkedFil
|
|
|
|
$this->logger = \OCP\Server::get(LoggerInterface::class);
|
|
|
|
$this->logger = \OCP\Server::get(LoggerInterface::class);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function mkdir($path, bool $force = false) {
|
|
|
|
public function mkdir($path, bool $force = false, array $metadata = []) {
|
|
|
|
$path = $this->normalizePath($path);
|
|
|
|
$path = $this->normalizePath($path);
|
|
|
|
if (!$force && $this->file_exists($path)) {
|
|
|
|
if (!$force && $this->file_exists($path)) {
|
|
|
|
$this->logger->warning("Tried to create an object store folder that already exists: $path");
|
|
|
|
$this->logger->warning("Tried to create an object store folder that already exists: $path");
|
|
|
|
@ -75,7 +75,7 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common implements IChunkedFil
|
|
|
|
$mTime = time();
|
|
|
|
$mTime = time();
|
|
|
|
$data = [
|
|
|
|
$data = [
|
|
|
|
'mimetype' => 'httpd/unix-directory',
|
|
|
|
'mimetype' => 'httpd/unix-directory',
|
|
|
|
'size' => 0,
|
|
|
|
'size' => $metadata['size'] ?? 0,
|
|
|
|
'mtime' => $mTime,
|
|
|
|
'mtime' => $mTime,
|
|
|
|
'storage_mtime' => $mTime,
|
|
|
|
'storage_mtime' => $mTime,
|
|
|
|
'permissions' => \OCP\Constants::PERMISSION_ALL,
|
|
|
|
'permissions' => \OCP\Constants::PERMISSION_ALL,
|
|
|
|
@ -712,7 +712,7 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common implements IChunkedFil
|
|
|
|
if ($cache->inCache($to)) {
|
|
|
|
if ($cache->inCache($to)) {
|
|
|
|
$cache->remove($to);
|
|
|
|
$cache->remove($to);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$this->mkdir($to);
|
|
|
|
$this->mkdir($to, false, ['size' => $sourceEntry->getSize()]);
|
|
|
|
|
|
|
|
|
|
|
|
foreach ($sourceCache->getFolderContentsById($sourceEntry->getId()) as $child) {
|
|
|
|
foreach ($sourceCache->getFolderContentsById($sourceEntry->getId()) as $child) {
|
|
|
|
$this->copyInner($sourceCache, $child, $to . '/' . $child->getName());
|
|
|
|
$this->copyInner($sourceCache, $child, $to . '/' . $child->getName());
|
|
|
|
|