Merge PR #348 from marcoarnulfo: Open: a password-protected presentation says so, and open errors show on the start screen

This commit is contained in:
Brandon Thomas
2026-10-14 12:57:23 -04:00
6 changed files with 228 additions and 5 deletions
+3
View File
@@ -82,6 +82,9 @@ pub fn open_presentation(name: &str, bytes: &[u8]) -> Result<Presentation> {
deckcraft_format::repair(&mut p);
return Ok(p);
}
if deckcraft_pptx::is_encrypted(bytes) {
return Err(EngineError::Other(format!("{name} is password-protected. DeckCraft can't open password-protected presentations yet.")));
}
let lower = name.to_ascii_lowercase();
if lower.ends_with(".txt") || lower.ends_with(".md") {
let text = String::from_utf8_lossy(bytes);