Remove containers from file name in grid view

What a strange bug to happen
This commit is contained in:
Ben S 2014-11-23 21:57:33 +00:00
parent 933f98d2c3
commit d7b8b230ef
2 changed files with 2 additions and 2 deletions

View File

@ -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];

View File

@ -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