1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

stat: Remove hard-coded path for mount information

This commit is contained in:
James McCoy 2018-01-14 14:52:24 -05:00
parent 81eef5dabf
commit c82e94cae5
No known key found for this signature in database
GPG key ID: DFE691AE331BA3DB

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()))