提交 d7b8b230 编写于 作者: B Ben S

Remove containers from file name in grid view

What a strange bug to happen
上级 933f98d2
......@@ -153,7 +153,7 @@ fn details_view(options: &Options, columns: &Vec<Column>, files: Vec<&File>) {
}
if num == columns.len() - 1 {
print!("{}", row.get(num));
print!("{}", row[num]);
}
else {
let padding = column_widths[num] - field_widths[num];
......
......@@ -32,7 +32,7 @@ pub struct File<'a> {
impl<'a> File<'a> {
pub fn from_path(path: &'a Path, parent: &'a Dir) -> IoResult<File<'a>> {
let v = path.filename().unwrap(); // fails if / or . or ..
let filename = String::from_utf8(v.to_vec()).to_string();
let filename = String::from_utf8(v.to_vec()).unwrap();
// Use lstat here instead of file.stat(), as it doesn't follow
// symbolic links. Otherwise, the stat() call will fail if it
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册