stat: Remove hard-coded path for mount information

This commit is contained in:
James McCoy
2018-01-16 20:48:03 -05:00
parent 81eef5dabf
commit c82e94cae5
+1 -1
View File
@@ -475,7 +475,7 @@ impl Stater {
// mount points aren't displayed when showing filesystem information
None
} else {
let reader = BufReader::new(File::open(MOUNT_INFO).expect("Failed to read /etc/mtab"));
let reader = BufReader::new(File::open(MOUNT_INFO).expect(&format!("Failed to read {}", MOUNT_INFO)));
let mut mount_list = reader.lines()
.filter_map(|s| s.ok())
.filter_map(|line| line.split_whitespace().nth(1).map(|s| s.to_owned()))