Skip to main content

map_container_paths

Function map_container_paths 

Source
pub(crate) fn map_container_paths(
    host_dir: &Path,
    paths: &[String],
) -> Result<Vec<String>, String>
Expand description

The host paths for files a container agent names: /workspace/..., or a path relative to its workspace. Anything else in the container (its home, /tmp) isn’t on the host and isn’t uploaded, and neither is a path with .. in it, which would reach the host folders beside the workspace. The result goes through check_upload_paths like a host agent’s, which resolves links on the host: a link in the workspace that leads outside it is refused.