Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/toolchain/toolchain/src/util/docker/archive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ async fn archive_oci_bundle(
cmd: Option<Vec<String>>,
entrypoint: Option<Vec<String>>,
env: Vec<String>,
#[serde(default)]
user: String,
#[serde(default)]
working_dir: String,
Expand Down Expand Up @@ -328,7 +329,7 @@ fn copy_container_to_rootfs(
// us
let old_path_bytes = entry.path_bytes().to_vec();
let old_path = UnixPath::new(old_path_bytes.as_ref() as &[u8]);
let old_path_relative = old_path.strip_prefix("/")?;
let old_path_relative = old_path.strip_prefix("/").unwrap_or(&old_path);
let new_path = root_path.join(old_path_relative);
let new_path_std = new_path.try_as_ref().context(format!(
"failed to convert unix path to os path: {new_path:?}"
Expand Down Expand Up @@ -372,7 +373,7 @@ fn copy_container_to_rootfs(
let old_link = UnixPath::new(old_link.as_ref() as &[u8]);

if old_link.is_absolute() {
let old_link_relative = old_link.strip_prefix("/")?;
let old_link_relative = old_link.strip_prefix("/").unwrap_or(&old_link);
let new_link = root_path.join(old_link_relative);
let new_link_std = new_link.try_as_ref().context(format!(
"failed to convert unix path to os path: {new_link:?}"
Expand Down
Loading