[Pkg-owncloud-commits] [owncloud] 98/111: always get the right node for the given file path
David Prévot
taffit at moszumanska.debian.org
Wed Nov 20 21:38:47 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit 51a8172868c1d6763041b12bfaa9cd2f1cbe8350
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date: Wed Nov 20 16:14:08 2013 +0100
always get the right node for the given file path
---
lib/private/connector/sabre/filesplugin.php | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/private/connector/sabre/filesplugin.php b/lib/private/connector/sabre/filesplugin.php
index 89444cb..1c80ebe 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)) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list