Seit langem nutze ich die App „Documents“ von Readdle. Seit dem letzten ownCloud-Update auf onwCloud 10.x werden hier Dateien als Ordner angezeigt. Andere WebDAV-Clients funktionieren soweit ich das beurteilen konnte.
Ich habe dann länger nach der Ursache geforscht. Unter anderem habe ich das ganze auch mit einer aktuellen nextCloud-Installation getestet, mit dem gleichen Ergebnis. Mit einer alten ownCloud 9 hingegen hat alles richtig funktioniert. Nach längerer Recherche fand ich dann die Lösung in diesem GitHub-Issue.
Zusammengefasst:
Im ownCloud-Verzeichnis gibt es die Datei /lib/composer/sabre/dav/lib/DAV/Server.php
In dieser sucht man nach @param PropFind und löscht den darunter folgenden Block raus und fügt den hier ein. Und schon funktioniert es wieder mit Readdle Documents und ownCloud 10.
* Small helper to support PROPFIND with DEPTH_INFINITY. * * * @param PropFind $propFind * @param array $yieldFirst * @return \Iterator */ private function generatePathNodes(PropFind $propFind, array $yieldFirst = null) { if ($yieldFirst !== null) { yield $yieldFirst; } $newDepth = $propFind->getDepth(); $path = $propFind->getPath(); if ($newDepth !== self::DEPTH_INFINITY) { $newDepth--; } //FIX in order to create new PropFind objects and not clone them $propertyNames = $propFind->getRequestedProperties(); $propFindType = $propertyNames ? PropFind::NORMAL : PropFind::ALLPROPS; foreach ($this->tree->getChildren($path) as $childNode) { //FIX : no cloning, creating new PropFind objects //$subPropFind = clone $propFind; //$subPropFind->setDepth($newDepth); if ($path !== '') { $subPath = $path . '/' . $childNode->getName(); } else { $subPath = $childNode->getName(); } //$subPropFind->setPath($subPath); //FIX : create a new PropFind object with the right parameters $subPropFind = new PropFind($subPath, $propertyNames, $newDepth, $propFindType); yield [ $subPropFind, $childNode ]; if (($newDepth === self::DEPTH_INFINITY || $newDepth >= 1) && $childNode instanceof ICollection) { foreach ($this->generatePathNodes($subPropFind) as $subItem) { yield $subItem; } } } }