Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f4188459fe |
+8
-2
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user