-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Bump sabre dav to 4.7.1 #62405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Bump sabre dav to 4.7.1 #62405
Changes from all commits
34ce236
451f68c
7a9561f
a3e12d4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,18 +21,12 @@ | |
| use OCP\Files\StorageInvalidException; | ||
| use OCP\Files\StorageNotAvailableException; | ||
| use OCP\Lock\LockedException; | ||
| use Sabre\DAV\INode; | ||
| use Sabre\DAV\Server; | ||
|
|
||
| class ObjectTree extends CachingTree { | ||
|
|
||
| /** | ||
| * @var View | ||
| */ | ||
| protected $fileView; | ||
|
|
||
| /** | ||
| * @var IMountManager | ||
| */ | ||
| protected $mountManager; | ||
| protected View $fileView; | ||
| protected IMountManager $mountManager; | ||
|
|
||
| /** | ||
| * Creates the object | ||
|
|
@@ -55,15 +49,14 @@ | |
| * Returns the INode object for the requested path | ||
| * | ||
| * @param string $path | ||
| * @return \Sabre\DAV\INode | ||
| * @throws InvalidPath | ||
| * @throws \Sabre\DAV\Exception\Locked | ||
| * @throws \Sabre\DAV\Exception\NotFound | ||
| * @throws \Sabre\DAV\Exception\ServiceUnavailable | ||
| */ | ||
| #[\Override] | ||
| public function getNodeForPath($path) { | ||
| public function getNodeForPath($path): INode { | ||
| if (!$this->fileView) { | ||
|
Check failure on line 59 in apps/dav/lib/Connector/Sabre/ObjectTree.php
|
||
| throw new \Sabre\DAV\Exception\ServiceUnavailable('filesystem not setup'); | ||
| } | ||
|
|
||
|
|
@@ -154,8 +147,8 @@ | |
| * @return void | ||
| */ | ||
| #[\Override] | ||
| public function copy($sourcePath, $destinationPath) { | ||
| public function copy($sourcePath, $destinationPath, int $depth = Server::DEPTH_INFINITY): void { | ||
| if (!$this->fileView) { | ||
|
Check failure on line 151 in apps/dav/lib/Connector/Sabre/ObjectTree.php
|
||
| throw new \Sabre\DAV\Exception\ServiceUnavailable('filesystem not setup'); | ||
| } | ||
|
|
||
|
|
@@ -170,7 +163,13 @@ | |
| } | ||
|
|
||
| // this will trigger existence check | ||
| $this->getNodeForPath($sourcePath); | ||
| $sourceNode = $this->getNodeForPath($sourcePath); | ||
|
|
||
| if ($sourceNode instanceof Directory && $depth !== Server::DEPTH_INFINITY) { | ||
| // Fallback to sabre slow default implementation with $depth support. | ||
| parent::copy($sourcePath, $destinationPath, $depth); | ||
| return; | ||
| } | ||
|
Comment on lines
+166
to
+172
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does that mean that passing a depth is slower than passing no limit?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @susnux since you are the one who extended the interface: sabre-io/dav#1495
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I also do not know why it should be slower, how did you measure it? |
||
|
|
||
| [$destinationDir, $destinationName] = \Sabre\Uri\split($destinationPath); | ||
| try { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.