From 488e090f97a2a416e0de78831097a4d4f5a599a6 Mon Sep 17 00:00:00 2001 From: yggverse Date: Mon, 1 Apr 2024 15:55:00 +0300 Subject: [PATCH] compare compressed snap file size instead of document download size --- src/cli/document/crawl.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/cli/document/crawl.php b/src/cli/document/crawl.php index 13f3596..972fe18 100644 --- a/src/cli/document/crawl.php +++ b/src/cli/document/crawl.php @@ -760,6 +760,10 @@ foreach($index->search('') $tmp ); + $filesize = filesize( + $tmp + ); + // Copy to local storage on enabled if ($config->snap->storage->local->enabled) { @@ -794,7 +798,7 @@ foreach($index->search('') { $allowed = false; - if ($size <= $config->snap->storage->local->size->max) + if ($filesize <= $config->snap->storage->local->size->max) { $allowed = true; } @@ -937,7 +941,7 @@ foreach($index->search('') // Check size limits $allowed = false; - if ($size <= $ftp->size->max) + if ($filesize <= $ftp->size->max) { $allowed = true; }