From 51a8172868c1d6763041b12bfaa9cd2f1cbe8350 Mon Sep 17 00:00:00 2001 From: Thomas Müller Date: Wed, 20 Nov 2013 16:14:08 +0100 Subject: always get the right node for the given file path --- lib/private/connector/sabre/filesplugin.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') diff --git a/lib/private/connector/sabre/filesplugin.php b/lib/private/connector/sabre/filesplugin.php index 89444cb8d18..1c80ebe8044 100644 --- a/lib/private/connector/sabre/filesplugin.php +++ b/lib/private/connector/sabre/filesplugin.php @@ -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)) { -- cgit v1.2.3