Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions lib/private/Files/ObjectStore/ObjectStoreStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -611,4 +611,17 @@ private function copyFile(ICacheEntry $sourceEntry, string $to) {
throw $e;
}
}

public function moveFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
while ($sourceStorage->instanceOfStorage(Jail::class)) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea if this is needed nor what it does.
It was in moveFromStorage function in Common.php and Local.php so I left it here

Check failure

Code scanning / Psalm

UndefinedClass

Class, interface or enum named OC\Files\ObjectStore\Jail does not exist

Check failure

Code scanning / Psalm

InvalidArgument

Argument 1 of OCP\Files\Storage\IStorage::instanceOfStorage expects class-string<OCP\Files\Storage\IStorage>, OC\Files\ObjectStore\Jail::class provided
/**
* @var Jail $sourceStorage
*/
$sourceInternalPath = $sourceStorage->getUnjailedPath($sourceInternalPath);

Check failure

Code scanning / Psalm

UndefinedDocblockClass

Docblock-defined class, interface or enum named OC\Files\ObjectStore\Jail does not exist

Check failure

Code scanning / Psalm

UndefinedDocblockClass

Docblock-defined class, interface or enum named OC\Files\ObjectStore\Jail does not exist
$sourceStorage = $sourceStorage->getUnjailedStorage();

Check failure

Code scanning / Psalm

UndefinedDocblockClass

Docblock-defined class, interface or enum named OC\Files\ObjectStore\Jail does not exist
}

$this->getCache()->moveFromCache($sourceStorage->getCache(), $sourceInternalPath, $targetInternalPath);
return true;
}
}