zeroclaw-labs/zeroclaw · error · anyhow::Error
Screenshot path '{ $path }' is missing a filename component
Error message
Screenshot path '{ $path }' is missing a filename component What it means
Error "Screenshot path '{ $path }' is missing a filename component" thrown in zeroclaw-labs/zeroclaw.
Source
Thrown at crates/zeroclaw-tools/src/browser.rs:901
if !self.security.is_resolved_path_allowed(&canonical) {
let msg = crate::i18n::get_required_tool_string_with_args(
"tool-browser-screenshot-error-path-outside-workspace",
&[
("path", raw_path),
("canonical", &canonical.display().to_string()),
],
);
anyhow::bail!("{msg}");
}
// Build the final *target* path (parent + file name) so we can apply
// the same target-level guards the file_write / file_edit tools use.
let Some(file_name) = full.file_name() else {
let msg = crate::i18n::get_required_tool_string_with_args(
"tool-browser-screenshot-error-missing-filename",
&[("path", raw_path)],
);
anyhow::bail!("{msg}");
};
let resolved_target = canonical.join(file_name);
if self.security.is_runtime_config_path(&resolved_target) {
let msg = crate::i18n::get_required_tool_string_with_args(
"tool-browser-screenshot-error-runtime-config-target",
&[
("path", raw_path),
("target", &resolved_target.display().to_string()),
],
);
anyhow::bail!("{msg}");
}
// If the target already exists and is a symlink, refuse to follow it.
if let Ok(meta) = tokio::fs::symlink_metadata(&resolved_target).await
&& meta.file_type().is_symlink()
{View on GitHub (pinned to 88bb9c8533)
Solutions
- Include a filename in the screenshot path, e.g. shots/page.png.
When it happens
Trigger: Thrown at crates/zeroclaw-tools/src/browser.rs:901 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23).
Data as JSON: /api/errors/8b3d2639b3e6e15c.
Report an issue: GitHub.