Skip to content
Snippets Groups Projects
Commit 51a81728 authored by Thomas Müller's avatar Thomas Müller
Browse files

always get the right node for the given file path

parent 30b8f4ec
No related branches found
No related tags found
No related merge requests found
......@@ -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)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment