From dc1ced70639e9fde9e60dbf4e0d510835332d16a Mon Sep 17 00:00:00 2001 From: David Bonnier Date: Thu, 22 Oct 2026 15:08:24 +0200 Subject: [PATCH] fix(psd): mark layers with no recognized channels as damaged Use `warn_unreadable_data` instead of `warn` when a layer has no recognized channel data. This ensures the import is flagged as damaged and triggers the interactive confirmation dialog, warning users that saving the document may discard unrecognized channel data. --- crates/io/src/psd_import.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/io/src/psd_import.rs b/crates/io/src/psd_import.rs index 0d1e7a6c52..db8d4056a9 100644 --- a/crates/io/src/psd_import.rs +++ b/crates/io/src/psd_import.rs @@ -226,7 +226,7 @@ impl Ctx<'_> { // Only decoded channel data justifies a buffer: the decoders bound their output by the // bytes in the file, but a bare rectangle can declare 300000² pixels in a few bytes (#755). if planes.iter().all(Option::is_none) { - self.warn(format!("layer \"{name}\": no channel data for its {w}x{h} bounds; treated as empty")); + self.warn_unreadable_data(format!("layer \"{name}\": no channel data for its {w}x{h} bounds; treated as empty")); return Surface::new(self.fmt); } let refs: Vec> = planes.iter().map(|p| p.as_deref()).collect();