tinyhumansai/openhuman · error
dest_path must be relative
Error message
dest_path must be relative
What it means
The relative dest_path contains a Prefix or RootDir component (typically a drive letter like C: or an embedded root slash), which cannot occur inside a genuinely relative path and is rejected by the component loop.
Source
Thrown at src/openhuman/tools/impl/network/curl.rs:71
let trimmed = dest.trim();
if trimmed.is_empty() {
anyhow::bail!("dest_path cannot be empty");
}
let p = Path::new(trimmed);
if p.is_absolute() {
anyhow::bail!("dest_path must be relative — got absolute path");
}
for component in p.components() {
match component {
Component::Normal(_) => {}
Component::CurDir => {}
Component::ParentDir => {
anyhow::bail!("dest_path may not contain '..'");
}
Component::Prefix(_) | Component::RootDir => {
anyhow::bail!("dest_path must be relative");
}
}
}
let root = self.workspace_dir.join(&self.dest_subdir);
let resolved = root.join(p);
// Belt-and-braces: ensure the resolved path still lives under root.
// Lexical check is sufficient because we already rejected `..`.
if !resolved.starts_with(&root) {
anyhow::bail!("dest_path resolves outside the downloads root");
}
Ok(resolved)
}
async fn validate_url(&self, raw_url: &str) -> anyhow::Result<String> {
validate_url_with_dns_check(raw_url, &self.allowed_domains).awaitView on GitHub (pinned to 7491200858)
Solutions
- Strip drive letters and leading slashes from dest_path
- Use a plain relative path such as 'downloads/file.zip'
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/openhuman/tools/impl/network/curl.rs:71 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17).
Data as JSON: /api/errors/6e095605dd0f6eec.
Report an issue: GitHub.