mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
dirname fix according from_utf8 return option now
This commit is contained in:
parent
e3ca4fdcf8
commit
3e2c58a562
1 changed files with 4 additions and 1 deletions
|
@ -60,7 +60,10 @@ directory).", opts));
|
|||
if !matches.free.is_empty() {
|
||||
for path in matches.free.iter() {
|
||||
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);
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue