diff options
Diffstat (limited to 'apps/dav/lib/Connector/Sabre/FilesPlugin.php')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/FilesPlugin.php | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php index 5a08e37a153..1b1f43df9ea 100644 --- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php @@ -386,25 +386,22 @@ class FilesPlugin extends ServerPlugin { * @return void */ public function handleUpdateProperties($path, PropPatch $propPatch) { - $propPatch->handle(self::LASTMODIFIED_PROPERTYNAME, function($time) use ($path) { + $node = $this->tree->getNodeForPath($path); + if (!($node instanceof \OCA\DAV\Connector\Sabre\Node)) { + return; + } + + $propPatch->handle(self::LASTMODIFIED_PROPERTYNAME, function($time) use ($node) { if (empty($time)) { return false; } - $node = $this->tree->getNodeForPath($path); - if (is_null($node)) { - return 404; - } $node->touch($time); return true; }); - $propPatch->handle(self::GETETAG_PROPERTYNAME, function($etag) use ($path) { + $propPatch->handle(self::GETETAG_PROPERTYNAME, function($etag) use ($node) { if (empty($etag)) { return false; } - $node = $this->tree->getNodeForPath($path); - if (is_null($node)) { - return 404; - } if ($node->setEtag($etag) !== -1) { return true; } |