From 264feb1093d587e5df457fac023852a0e578b22f Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 10 Aug 2026 02:59:50 +0900 Subject: fix(php-shim): return an error from fileperms instead of 0 fileperms swallowed metadata errors and reported a mode of 0, which the callers could not tell apart from a real (if implausible) mode: the zip archiver stored entries with no permission bits, and Filesystem::copy chmod-ed the target to 0. It now returns Result so both callers propagate the failure. The switch to u32 also drops the casts around the mode arithmetic and ZipArchive's entry attributes. Co-Authored-By: Claude Opus 5 (1M context) --- crates/shirabe/src/package/archiver/zip_archiver.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/shirabe/src/package') diff --git a/crates/shirabe/src/package/archiver/zip_archiver.rs b/crates/shirabe/src/package/archiver/zip_archiver.rs index 5604c07d..2ef9473e 100644 --- a/crates/shirabe/src/package/archiver/zip_archiver.rs +++ b/crates/shirabe/src/package/archiver/zip_archiver.rs @@ -70,7 +70,7 @@ impl ArchiverInterface for ZipArchiver { } // Ensure to preserve the permission umasks for the filepath in the archive. - let perms = fileperms(&filepath); + let perms = fileperms(&filepath)?; if filepath.is_dir() { zip.add_empty_dir( -- cgit v1.3.1-4-g156e