Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion 3rdparty
Submodule 3rdparty updated 75 files
+1 −1 .github/workflows/composer-auto.yml
+1 −1 .github/workflows/composer.yml
+1 −1 .github/workflows/lint-php.yml
+0 −26 .patches/check-for-instanceof-INode-instead-of-Node-1595.patch
+0 −51 .patches/sabre-vobject-iTipBroker-replies.patch
+0 −43 .patches/sabre-vobject-rdate.patch
+1 −1 composer.json
+24 −24 composer.lock
+0 −7 composer.patches.json
+0 −2 composer/LICENSE
+27 −36 composer/installed.json
+12 −12 composer/installed.php
+0 −7 sabre/dav/PATCHES.txt
+40 −20 sabre/dav/lib/CalDAV/Backend/PDO.php
+1 −1 sabre/dav/lib/CalDAV/Notifications/Plugin.php
+12 −12 sabre/dav/lib/CalDAV/Plugin.php
+2 −2 sabre/dav/lib/CalDAV/Schedule/Plugin.php
+2 −2 sabre/dav/lib/CalDAV/SharingPlugin.php
+2 −2 sabre/dav/lib/CalDAV/Subscriptions/Plugin.php
+2 −2 sabre/dav/lib/CalDAV/Xml/Request/CalendarMultiGetReport.php
+6 −6 sabre/dav/lib/CalDAV/Xml/Request/CalendarQueryReport.php
+2 −2 sabre/dav/lib/CalDAV/Xml/Request/MkCalendar.php
+2 −2 sabre/dav/lib/CalDAV/Xml/Request/Share.php
+21 −20 sabre/dav/lib/CardDAV/Backend/PDO.php
+5 −5 sabre/dav/lib/CardDAV/Plugin.php
+2 −2 sabre/dav/lib/CardDAV/Xml/Request/AddressBookMultiGetReport.php
+4 −4 sabre/dav/lib/CardDAV/Xml/Request/AddressBookQueryReport.php
+2 −2 sabre/dav/lib/DAV/Browser/Plugin.php
+9 −4 sabre/dav/lib/DAV/CorePlugin.php
+0 −4 sabre/dav/lib/DAV/FSExt/Directory.php
+1 −3 sabre/dav/lib/DAV/FSExt/File.php
+4 −1 sabre/dav/lib/DAV/ICopyTarget.php
+1 −2 sabre/dav/lib/DAV/Locks/Plugin.php
+22 −6 sabre/dav/lib/DAV/Server.php
+1 −1 sabre/dav/lib/DAV/Sharing/Plugin.php
+1 −1 sabre/dav/lib/DAV/Sync/Plugin.php
+26 −11 sabre/dav/lib/DAV/Tree.php
+1 −1 sabre/dav/lib/DAV/Version.php
+1 −1 sabre/dav/lib/DAV/Xml/Element/Prop.php
+1 −1 sabre/dav/lib/DAV/Xml/Element/Response.php
+1 −1 sabre/dav/lib/DAV/Xml/Element/Sharee.php
+1 −1 sabre/dav/lib/DAV/Xml/Request/Lock.php
+3 −3 sabre/dav/lib/DAV/Xml/Request/MkCol.php
+1 −1 sabre/dav/lib/DAV/Xml/Request/PropFind.php
+3 −3 sabre/dav/lib/DAV/Xml/Request/PropPatch.php
+2 −2 sabre/dav/lib/DAV/Xml/Request/ShareResource.php
+1 −1 sabre/dav/lib/DAV/Xml/Request/SyncCollectionReport.php
+1 −1 sabre/dav/lib/DAV/Xml/Response/MultiStatus.php
+6 −6 sabre/dav/lib/DAV/Xml/Service.php
+8 −8 sabre/dav/lib/DAVACL/Plugin.php
+3 −3 sabre/dav/lib/DAVACL/Xml/Property/Acl.php
+1 −1 sabre/dav/lib/DAVACL/Xml/Property/CurrentUserPrivilegeSet.php
+2 −2 sabre/dav/lib/DAVACL/Xml/Request/PrincipalPropertySearchReport.php
+7 −3 sabre/event/lib/Promise.php
+4 −5 sabre/event/lib/Promise/functions.php
+1 −1 sabre/event/lib/Version.php
+6 −7 sabre/event/lib/WildcardEmitterTrait.php
+3 −4 sabre/event/lib/coroutine.php
+11 −4 sabre/http/lib/Request.php
+1 −1 sabre/http/lib/Version.php
+0 −11 sabre/vobject/PATCHES.txt
+28 −0 sabre/vobject/lib/Component/VCard.php
+16 −9 sabre/vobject/lib/Document.php
+4 −0 sabre/vobject/lib/ElementList.php
+12 −8 sabre/vobject/lib/ITip/Broker.php
+4 −0 sabre/vobject/lib/Node.php
+23 −2 sabre/vobject/lib/Parser/MimeDir.php
+4 −0 sabre/vobject/lib/Property.php
+2 −0 sabre/vobject/lib/Property/ICalendar/DateTime.php
+10 −5 sabre/vobject/lib/Property/ICalendar/Period.php
+13 −2 sabre/vobject/lib/TimezoneGuesser/FindFromTimezoneMap.php
+1 −1 sabre/vobject/lib/Version.php
+4 −3 sabre/vobject/lib/timezonedata/exchangezones.php
+3 −3 sabre/vobject/lib/timezonedata/lotuszones.php
+7 −7 sabre/vobject/lib/timezonedata/windowszones.php
7 changes: 6 additions & 1 deletion apps/dav/lib/Connector/Sabre/Directory.php
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,12 @@ public function moveInto($targetName, $fullSourcePath, INode $sourceNode) {
}

#[\Override]
public function copyInto($targetName, $sourcePath, INode $sourceNode) {
public function copyInto($targetName, $sourcePath, INode $sourceNode, int $depth): bool {
Comment thread
CarlSchwan marked this conversation as resolved.
if ($sourceNode instanceof Directory && $depth !== \Sabre\DAV\Server::DEPTH_INFINITY) {
// Fall back to sabre default copyNode() implementation
return false;
}

if ($sourceNode instanceof File || $sourceNode instanceof Directory) {
try {
$destinationPath = $this->getPath() . '/' . $targetName;
Expand Down
27 changes: 13 additions & 14 deletions apps/dav/lib/Connector/Sabre/ObjectTree.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

View workflow job for this annotation

GitHub Actions / static-code-analysis

TypeDoesNotContainType

apps/dav/lib/Connector/Sabre/ObjectTree.php:59:8: TypeDoesNotContainType: Type OC\Files\View for $this->fileView is never falsy (see https://psalm.dev/056)

Check failure on line 59 in apps/dav/lib/Connector/Sabre/ObjectTree.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

TypeDoesNotContainType

apps/dav/lib/Connector/Sabre/ObjectTree.php:59:7: TypeDoesNotContainType: Operand of type false is always falsy (see https://psalm.dev/056)
throw new \Sabre\DAV\Exception\ServiceUnavailable('filesystem not setup');
}

Expand Down Expand Up @@ -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

View workflow job for this annotation

GitHub Actions / static-code-analysis

TypeDoesNotContainType

apps/dav/lib/Connector/Sabre/ObjectTree.php:151:8: TypeDoesNotContainType: Type OC\Files\View for $this->fileView is never falsy (see https://psalm.dev/056)

Check failure on line 151 in apps/dav/lib/Connector/Sabre/ObjectTree.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

TypeDoesNotContainType

apps/dav/lib/Connector/Sabre/ObjectTree.php:151:7: TypeDoesNotContainType: Operand of type false is always falsy (see https://psalm.dev/056)
throw new \Sabre\DAV\Exception\ServiceUnavailable('filesystem not setup');
}

Expand All @@ -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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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?
That sounds surprising, is the depth limit sent by webdav clients?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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 {
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/ExampleContentFiles/exampleContact.vcf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BEGIN:VCARD
VERSION:3.0
PRODID:-//Sabre//Sabre VObject 4.5.6//EN
PRODID:-//Sabre//Sabre VObject 4.6.1//EN
UID:cffff367-4580-4e01-8b6d-f91e95ce7e92
FN:Leon Green
ADR;TYPE=HOME:;;123 Street Street;City;State;;Country
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Sabre//Sabre VObject 4.5.6//EN
PRODID:-//Sabre//Sabre VObject 4.6.1//EN
CALSCALE:GREGORIAN
BEGIN:VEVENT
UID:RANDOM-UID
Expand Down
2 changes: 1 addition & 1 deletion tests/data/ics/event-builder-complete.ics
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Sabre//Sabre VObject 4.5.6//EN
PRODID:-//Sabre//Sabre VObject 4.6.1//EN
CALSCALE:GREGORIAN
BEGIN:VEVENT
UID:event-uid-123
Expand Down
2 changes: 1 addition & 1 deletion tests/data/ics/event-builder-without-attendees.ics
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Sabre//Sabre VObject 4.5.6//EN
PRODID:-//Sabre//Sabre VObject 4.6.1//EN
CALSCALE:GREGORIAN
BEGIN:VEVENT
UID:event-uid-123
Expand Down
2 changes: 1 addition & 1 deletion tests/data/ics/free-busy-request.ics
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Sabre//Sabre VObject 4.5.6//EN
PRODID:-//Sabre//Sabre VObject 4.6.1//EN
CALSCALE:GREGORIAN
METHOD:REQUEST
BEGIN:VFREEBUSY
Expand Down
6 changes: 3 additions & 3 deletions tests/lib/Calendar/ManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ private function getFreeBusyResponse(): string {
<cal:request-status>2.0;Success</cal:request-status>
<cal:calendar-data>BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Sabre//Sabre VObject 4.5.6//EN
PRODID:-//Sabre//Sabre VObject 4.6.1//EN
CALSCALE:GREGORIAN
METHOD:REPLY
BEGIN:VFREEBUSY
Expand All @@ -1004,7 +1004,7 @@ private function getFreeBusyResponse(): string {
<cal:request-status>2.0;Success</cal:request-status>
<cal:calendar-data>BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Sabre//Sabre VObject 4.5.6//EN
PRODID:-//Sabre//Sabre VObject 4.6.1//EN
CALSCALE:GREGORIAN
METHOD:REPLY
BEGIN:VFREEBUSY
Expand All @@ -1025,7 +1025,7 @@ private function getFreeBusyResponse(): string {
<cal:request-status>2.0;Success</cal:request-status>
<cal:calendar-data>BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Sabre//Sabre VObject 4.5.6//EN
PRODID:-//Sabre//Sabre VObject 4.6.1//EN
CALSCALE:GREGORIAN
METHOD:REPLY
BEGIN:VFREEBUSY
Expand Down
Loading