1 Commits
Author SHA1 Message Date
pyro f4188459fe fixed a bug where distrobox creation was failing because of folder
naming logic for the volumes
2026-10-01 10:51:28 -05:00
+8 -2
View File
@@ -324,11 +324,17 @@ impl DistroBox {
.arg(self.name.clone());
let mut added_volumes = Vec::new();
for volume in &self.volumes {
let folder_name = volume.split("/").last().unwrap();
let mut folder_name = volume.split("/").last().unwrap();
if folder_name.contains("pentest")
|| folder_name.contains("project")
|| folder_name.contains("ctf")
{
folder_name = "project";
}
if !added_volumes.contains(&String::from(folder_name)) {
create_command
.arg("--volume")
.arg(format!("{}:/project:rw", volume));
.arg(format!("{}:/{}:rw", volume, folder_name));
added_volumes.push(folder_name.to_string());
}
}