BigPizzaV3/CodexPlusPlus · error · anyhow::Error
Dream Skin theme directory contains unknown entry: {name}
Error message
Dream Skin theme directory contains unknown entry: {name} What it means
Security guard in ensure_known_theme_directory: a theme directory may only contain the config file, the import image, and image.* files with supported extensions. Any other entry (unexpected file, directory, or symlink) triggers this error, protecting replace/remove operations from touching unknown content.
Source
Thrown at crates/codex-plus-core/src/dream_skin_library.rs:639
Ok(())
}
fn ensure_known_theme_directory(directory: &Path) -> anyhow::Result<()> {
for entry in std::fs::read_dir(directory)? {
let path = entry?.path();
let name = path
.file_name()
.and_then(|value| value.to_str())
.unwrap_or("");
let metadata = std::fs::symlink_metadata(&path)?;
let known = metadata.file_type().is_file()
&& !metadata.file_type().is_symlink()
&& (name == THEME_CONFIG_FILE
|| name == ".dream-skin-import.jpg"
|| (name.starts_with("image.") && supported_image_extension(&path))
|| matches!(name, "theme.css" | "manifest.json" | "LICENSE.txt"));
if !known {
bail!("Dream Skin theme directory contains unknown entry: {name}");
}
}
Ok(())
}
fn remove_known_theme_directory(directory: &Path) -> anyhow::Result<()> {
if !directory.exists() {
return Ok(());
}
ensure_known_theme_directory(directory)?;
for entry in std::fs::read_dir(directory)? {
let path = entry?.path();
std::fs::remove_file(&path)
.with_context(|| format!("failed to remove {}", path.display()))?;
}
std::fs::remove_dir(directory)
.with_context(|| format!("failed to remove {}", directory.display()))?;
Ok(())View on GitHub (pinned to f2074595a2)
Solutions
- Inspect the theme directory and remove the unrecognized entry manually
- Reinstall or re-import the theme so its directory is recreated cleanly
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/codex-plus-core/src/dream_skin_library.rs:639 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BigPizzaV3/CodexPlusPlus@f2074595a2 (2026-08-23).
Data as JSON: /api/errors/4d2fc91936d3c115.
Report an issue: GitHub.