File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616- openssl vendoring broken on macos ([ #772 ] ( https://github.com/extrawurst/gitui/issues/772 ) )
1717- amend and other commands not shown in help ([ #778 ] ( https://github.com/extrawurst/gitui/issues/778 ) )
1818- focus locked on commit msg details in narrow term sizes ([ #780 ] ( https://github.com/extrawurst/gitui/issues/780 ) )
19+ - non-utf8 file/path names broke filetree ([ #802 ] ( https://github.com/extrawurst/gitui/issues/802 ) )
1920
2021## [ 0.16.1] - 2021-06-06
2122
Original file line number Diff line number Diff line change 1- use super :: { utils :: bytes2string , CommitId } ;
1+ use super :: CommitId ;
22use crate :: {
33 error:: { Error , Result } ,
44 sync:: utils:: repo,
@@ -101,7 +101,8 @@ fn tree_recurse(
101101 out. reserve ( tree. len ( ) ) ;
102102
103103 for e in tree {
104- let path = path. join ( bytes2string ( e. name_bytes ( ) ) ?) ;
104+ let p = String :: from_utf8_lossy ( e. name_bytes ( ) ) ;
105+ let path = path. join ( p. to_string ( ) ) ;
105106 match e. kind ( ) {
106107 Some ( git2:: ObjectType :: Blob ) => {
107108 let id = e. id ( ) ;
Original file line number Diff line number Diff line change @@ -55,8 +55,10 @@ impl FileTree {
5555
5656 ///
5757 pub fn collapse_but_root ( & mut self ) {
58- self . items . collapse ( 0 , true ) ;
59- self . items . expand ( 0 , false ) ;
58+ if !self . is_empty ( ) {
59+ self . items . collapse ( 0 , true ) ;
60+ self . items . expand ( 0 , false ) ;
61+ }
6062 }
6163
6264 /// iterates visible elements starting from `start_index_visual`
You can’t perform that action at this time.
0 commit comments