From 659e8a4ee130d968ef6bfb22159fb547e366f969 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 16 Aug 2026 16:25:52 +0900 Subject: fix(php-shim): fail RecursiveIteratorFileInfo::get_size on a failed stat This is the type Filesystem::directory_size() actually iterates, and it swallowed a failed stat as 0 the same way. PHP's iterator yields \SplFileInfo there, so raise the same \RuntimeException it would. Co-Authored-By: Claude Opus 5 (1M context) --- crates/shirabe/src/util/filesystem.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/shirabe') diff --git a/crates/shirabe/src/util/filesystem.rs b/crates/shirabe/src/util/filesystem.rs index 44dddb8c..1a9ab703 100644 --- a/crates/shirabe/src/util/filesystem.rs +++ b/crates/shirabe/src/util/filesystem.rs @@ -856,7 +856,7 @@ impl Filesystem { let mut size: i64 = 0; for file in &ri { if file.is_file() { - size += file.get_size(); + size += file.get_size()?; } } -- cgit v1.3.1-4-g156e