mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-21 09:26:43 +00:00
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:
1 file changed
+3
-1
@@ -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") {
|
||||
|
||||
Reference in new issue
Block a user