mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-26 02:41:54 +00:00
Fix panic on making tree
This commit is contained in:
parent
a55a918d4f
commit
fd691b7835
1 changed files with 5 additions and 1 deletions
|
|
@ -577,7 +577,11 @@ func (self *tree_node) add_child(f *remote_file) *tree_node {
|
|||
return self
|
||||
}
|
||||
c := tree_node{entry: f, parent: self, added_files: make(map[*remote_file]*tree_node)}
|
||||
f.expanded_local_path = filepath.Join(self.entry.expanded_local_path, filepath.Base(f.remote_path))
|
||||
if self.entry != nil {
|
||||
f.expanded_local_path = filepath.Join(self.entry.expanded_local_path, filepath.Base(f.remote_path))
|
||||
} else {
|
||||
f.expanded_local_path = f.remote_path
|
||||
}
|
||||
self.added_files[f] = &c
|
||||
return &c
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue