diff options
author | Robin Appelman <robin@icewind.nl> | 2022-06-20 17:56:59 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2022-08-16 12:07:14 +0200 |
commit | 5e375d9092efd1e40a0ed37dfd2c208598b27bb9 (patch) | |
tree | 1f6004229a3299f57059e913bd507f0193f6932f /lib/private/Files/FileInfo.php | |
parent | 6e0123a1d0343b6b850ef6e3b341acf082fa0dce (diff) | |
download | nextcloud-server-5e375d9092efd1e40a0ed37dfd2c208598b27bb9.tar.gz nextcloud-server-5e375d9092efd1e40a0ed37dfd2c208598b27bb9.zip |
Revert "store unencrypted size in the unencrypted_size column"
This reverts commit 8238582e59b7b6ec03318bcf81bf47cce54af320.
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Files/FileInfo.php')
-rw-r--r-- | lib/private/Files/FileInfo.php | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/lib/private/Files/FileInfo.php b/lib/private/Files/FileInfo.php index 47c893ebbf1..21197e016ca 100644 --- a/lib/private/Files/FileInfo.php +++ b/lib/private/Files/FileInfo.php @@ -212,12 +212,7 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess { public function getSize($includeMounts = true) { if ($includeMounts) { $this->updateEntryfromSubMounts(); - - if (isset($this->data['unencrypted_size']) && $this->data['unencrypted_size'] > 0) { - return $this->data['unencrypted_size']; - } else { - return isset($this->data['size']) ? 0 + $this->data['size'] : 0; - } + return isset($this->data['size']) ? 0 + $this->data['size'] : 0; } else { return $this->rawSize; } @@ -395,19 +390,7 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess { * @param string $entryPath full path of the child entry */ public function addSubEntry($data, $entryPath) { - if (!$data) { - return; - } - $hasUnencryptedSize = isset($data['unencrypted_size']) && $data['unencrypted_size'] > 0; - if ($hasUnencryptedSize) { - $subSize = $data['unencrypted_size']; - } else { - $subSize = $data['size'] ?: 0; - } - $this->data['size'] += $subSize; - if ($hasUnencryptedSize) { - $this->data['unencrypted_size'] += $subSize; - } + $this->data['size'] += isset($data['size']) ? $data['size'] : 0; if (isset($data['mtime'])) { $this->data['mtime'] = max($this->data['mtime'], $data['mtime']); } |