diff options
Diffstat (limited to 'apps/dav/lib/Connector/Sabre/File.php')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/File.php | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php index 6bb30591d95..5ff5f831eb5 100644 --- a/apps/dav/lib/Connector/Sabre/File.php +++ b/apps/dav/lib/Connector/Sabre/File.php @@ -343,9 +343,11 @@ class File extends Node implements IFile { if (isset($this->request->server['HTTP_OC_CHECKSUM'])) { $checksum = trim($this->request->server['HTTP_OC_CHECKSUM']); - $this->setChecksum($checksum); + $this->fileView->putFileInfo($this->path, ['checksum' => $checksum]); + $this->refreshInfo(); } elseif ($this->getChecksum() !== null && $this->getChecksum() !== '') { - $this->setChecksum(''); + $this->fileView->putFileInfo($this->path, ['checksum' => '']); + $this->refreshInfo(); } } catch (StorageNotAvailableException $e) { throw new ServiceUnavailable("Failed to check file size: " . $e->getMessage(), 0, $e); @@ -686,18 +688,9 @@ class File extends Node implements IFile { return $this->info->getChecksum(); } - public function setChecksum(string $checksum) { - $this->fileView->putFileInfo($this->path, ['checksum' => $checksum]); - $this->refreshInfo(); - } - protected function header($string) { if (!\OC::$CLI) { \header($string); } } - - public function hash(string $type) { - return $this->fileView->hash($type, $this->path); - } } |