From 56513e69a865d01a57eb9a30f7b2e1b04a4872ec Mon Sep 17 00:00:00 2001 From: guillermogomez Date: Wed, 22 May 2024 21:29:34 -0400 Subject: [PATCH] Issue #609: When a file size is 0 bytes do not mark it as location error --- classes/local/store/object_file_system.php | 2 +- classes/local/store/s3/file_system.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/local/store/object_file_system.php b/classes/local/store/object_file_system.php index 179f011a..885cb6dd 100644 --- a/classes/local/store/object_file_system.php +++ b/classes/local/store/object_file_system.php @@ -406,7 +406,7 @@ public function readfile(\stored_file $file) { $this->logger->log_object_read('readfile', $path, $file->get_filesize()); - if (!$success) { + if ($success === false) { manager::update_object_by_hash($file->get_contenthash(), OBJECT_LOCATION_ERROR); } } diff --git a/classes/local/store/s3/file_system.php b/classes/local/store/s3/file_system.php index b3533952..655f545f 100644 --- a/classes/local/store/s3/file_system.php +++ b/classes/local/store/s3/file_system.php @@ -59,7 +59,7 @@ public function readfile(\stored_file $file) { $this->get_logger()->end_timing(); $this->get_logger()->log_object_read('readfile', $path, $file->get_filesize()); - if (!$success) { + if ($success === false) { manager::update_object_by_hash($file->get_contenthash(), OBJECT_LOCATION_ERROR); } }