Skip to content

Commit

Permalink
fixup mount log
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Aug 2, 2023
1 parent c52ac90 commit e183208
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/virt_io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,11 @@ pub(crate) fn create_io_virt<'a>(
full_path.push('/');
}
full_path.push_str(file_name_str);
virtual_files.insert(format!("{path}{}{name}/{file_name_str}", if path.len() > 0 { "/" } else { "" }), full_path.to_string());
virtual_files.insert(format!(
"{path}{}{name}{}{file_name_str}",
if path.len() > 0 && !path.ends_with('/') { "/" } else { "" },
if name.len() > 0 && !name.ends_with('/') { "/" } else { "" }
), full_path.to_string());
entries.insert(file_name_str.into(), FsEntry::Virtualize(full_path));
}
*entry = FsEntry::Dir(entries);
Expand Down

0 comments on commit e183208

Please sign in to comment.