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.
This commit is contained in:
Vikram Bhaskaran committed 2026-10-15 22:55:05 +11:00
1 parent f784275180
commit 26cdfae307
1 file changed
+3 -1
+3 -1
View File
@@ -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") {