name nvme partitions correctly

This commit is contained in:
Bruce Leidl 2021-10-04 06:11:37 -04:00
parent 8d8f9b69ee
commit e07d35944a

View File

@ -534,8 +534,12 @@ impl Installer {
} }
fn target_partition(&self, num: usize) -> String { fn target_partition(&self, num: usize) -> String {
if self.target_str().starts_with("/dev/nvme") {
format!("{}p{}", self.target().display(), num)
} else {
format!("{}{}", self.target().display(), num) format!("{}{}", self.target().display(), num)
} }
}
fn artifact_path(&self, filename: &str) -> PathBuf { fn artifact_path(&self, filename: &str) -> PathBuf {
Path::new(&self.artifact_directory).join(filename) Path::new(&self.artifact_directory).join(filename)