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

dirname fix according from_utf8 return option now

This commit is contained in:
Heather 2014-01-22 15:27:08 +04:00
parent e3ca4fdcf8
commit 3e2c58a562

View file

@ -60,7 +60,10 @@ directory).", opts));
if !matches.free.is_empty() { if !matches.free.is_empty() {
for path in matches.free.iter() { for path in matches.free.iter() {
let p = std::path::Path::new(path.clone()); let p = std::path::Path::new(path.clone());
print(std::str::from_utf8(p.dirname())); let d = std::str::from_utf8(p.dirname());
if d.is_some() {
print(d.unwrap());
}
print(separator); print(separator);
} }
} else { } else {