Skip to content

Commit fd2cec8

Browse files
committed
disks: Ensure proper path joining for non mock devices
Signed-off-by: Ikey Doherty <[email protected]>
1 parent a18aee3 commit fd2cec8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/disks/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ impl BlockDevice {
6868
match **disk {
6969
Disk::Scsi(_) | Disk::Virtual(_) => {
7070
// Add N to the end of the device name
71-
return disk.device_path().join(format!("{}{}", disk.name(), index));
71+
return disk.device_path().with_file_name(format!("{}{}", disk.name(), index));
7272
}
7373
Disk::Mock(ref d) if d.parts_prefix => {
7474
return PathBuf::from("/dev").join(format!("{}p{}", disk.name(), index));

0 commit comments

Comments
 (0)