Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2021-11-01 13:26:17 +0300
committerGitHub <noreply@github.com>2021-11-01 13:26:17 +0300
commitd6a26b25364a1ab2183085d09546d8b075ceff6b (patch)
tree3fac0dd35a7a47c093d7fabcbd1133df7a8f9a11 /apps/dav/lib/Connector/Sabre/File.php
parente1bf5c1cd37f29281ab775795b8af0edbb3fc11f (diff)
Revert "add dav plugin to trigger recalculating of checksums"
Diffstat (limited to 'apps/dav/lib/Connector/Sabre/File.php')
-rw-r--r--apps/dav/lib/Connector/Sabre/File.php15
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);
- }
}