|
|
|
@ -469,6 +469,7 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node implements \Sabre\DAV\ICol
|
|
|
|
|
|
|
|
|
|
public function copyInto($targetName, $sourcePath, INode $sourceNode) {
|
|
|
|
|
if ($sourceNode instanceof File || $sourceNode instanceof Directory) {
|
|
|
|
|
try {
|
|
|
|
|
$destinationPath = $this->getPath() . '/' . $targetName;
|
|
|
|
|
$sourcePath = $sourceNode->getPath();
|
|
|
|
|
|
|
|
|
@ -483,6 +484,13 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node implements \Sabre\DAV\ICol
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $this->fileView->copy($sourcePath, $destinationPath);
|
|
|
|
|
} catch (StorageNotAvailableException $e) {
|
|
|
|
|
throw new ServiceUnavailable($e->getMessage());
|
|
|
|
|
} catch (ForbiddenException $ex) {
|
|
|
|
|
throw new Forbidden($ex->getMessage(), $ex->getRetry());
|
|
|
|
|
} catch (LockedException $e) {
|
|
|
|
|
throw new FileLocked($e->getMessage(), $e->getCode(), $e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|