mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -04:00
Merge pull request #5966 from owncloud/fixing-fileid-webdav-master
always get the right node for the given file path
This commit is contained in:
commit
8f33286b19
1 changed files with 2 additions and 0 deletions
|
|
@ -78,6 +78,8 @@ class OC_Connector_Sabre_FilesPlugin extends Sabre_DAV_ServerPlugin
|
|||
* @throws Sabre_DAV_Exception_BadRequest
|
||||
*/
|
||||
public function sendFileIdHeader($filePath, Sabre_DAV_INode $node = null) {
|
||||
// we get the node for the given $filePath here because in case of afterCreateFile $node is the parent folder
|
||||
$node = $this->server->tree->getNodeForPath($filePath);
|
||||
if ($node instanceof OC_Connector_Sabre_Node) {
|
||||
$fileId = $node->getFileId();
|
||||
if (!is_null($fileId)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue