Merge pull request #1676 from sdraeger/fix/ctl-screenshot-spaces

horizon-ctl screenshot: paths with spaces
This commit is contained in:
Ludovic Marie
2026-10-25 14:11:15 +01:00
committed by GitHub
+4 -1
View File
@@ -513,7 +513,10 @@ impl Game<'_> {
if self.pending_screenshot.is_some() {
return Err("a screenshot is already pending".into());
}
renderer.screenshot = Some(arg(1)?.into());
arg(1)?;
// The rest of the line: a path may hold spaces.
let path = line.trim_start().strip_prefix("screenshot").unwrap_or("");
renderer.screenshot = Some(path.trim().into());
self.pending_screenshot = Some(reply.clone());
Ok(None)
}