summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-11-20 16:14:08 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2013-11-20 16:14:08 +0100
commit51a8172868c1d6763041b12bfaa9cd2f1cbe8350 (patch)
tree0afb0a6a70b6cab598569dc4d4a0aaa592485056 /lib
parent30b8f4ec8e3dbf8e2d5d3627e0447bc20da50335 (diff)
downloadnextcloud-server-51a8172868c1d6763041b12bfaa9cd2f1cbe8350.tar.gz
nextcloud-server-51a8172868c1d6763041b12bfaa9cd2f1cbe8350.zip
always get the right node for the given file path
Diffstat (limited to 'lib')
-rw-r--r--lib/private/connector/sabre/filesplugin.php2
1 files changed, 2 insertions, 0 deletions
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)) {