Ver código fonte

Remove containers from file name in grid view

What a strange bug to happen
Ben S 11 anos atrás
pai
commit
d7b8b230ef
2 arquivos alterados com 2 adições e 2 exclusões
  1. 1 1
      src/exa.rs
  2. 1 1
      src/file.rs

+ 1 - 1
src/exa.rs

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

+ 1 - 1
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<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