From d7b8b230ef49278be58adfb6dc6d699df8cf7e97 Mon Sep 17 00:00:00 2001 From: Ben S Date: Sun, 23 Nov 2014 21:57:33 +0000 Subject: [PATCH] Remove containers from file name in grid view What a strange bug to happen --- src/exa.rs | 2 +- src/file.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/exa.rs b/src/exa.rs index ccc8b51..035c234 100644 --- a/src/exa.rs +++ b/src/exa.rs @@ -153,7 +153,7 @@ fn details_view(options: &Options, columns: &Vec, files: Vec<&File>) { } if num == columns.len() - 1 { - print!("{}", row.get(num)); + print!("{}", row[num]); } else { let padding = column_widths[num] - field_widths[num]; diff --git a/src/file.rs b/src/file.rs index 2bafdd1..21105da 100644 --- a/src/file.rs +++ b/src/file.rs @@ -32,7 +32,7 @@ pub struct File<'a> { impl<'a> File<'a> { pub fn from_path(path: &'a Path, parent: &'a Dir) -> IoResult> { 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