From 26cdfae307c3aed3d6464862bba50bdf0eac2515 Mon Sep 17 00:00:00 2001 From: Vikram Bhaskaran Date: Thu, 15 Oct 2026 22:55:05 +1100 Subject: [PATCH] IO: route declared Photoshop extensions through is_psd_input. The helpers-only use made cargo clippy -p photocraft-io --all-targets flag is_psd_input as never used; import_stages now calls it for the extension branch, keeping the magic-first order that lets an Affinity file renamed .psd stay with the Affinity loader. --- crates/io/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/io/src/lib.rs b/crates/io/src/lib.rs index 7c67ab4970..7050cffd77 100644 --- a/crates/io/src/lib.rs +++ b/crates/io/src/lib.rs @@ -302,7 +302,9 @@ fn import_stages(name: &str, bytes: &[u8], ctl: &photocraft_raster::Interrupt, m if affinity::is_affinity(bytes) || affinity::has_extension(name) { return affinity::import(name, bytes); } - if PSD_EXTS.iter().any(|e| has_extension(name, e)) { + // Same predicate as above; the magic case already returned, so this routes the declared + // `.psd`/`.psb`/`.psdt` extensions that are not Affinity containers. + if is_psd_input(name, bytes) { return import_psd(name, bytes, ctl); } if ora::is_ora(bytes) || has_extension(name, "ora") {