From 7e1e97d050dd38b08e0131776bf130bae1fb1a4c Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Tue, 28 Aug 2018 19:12:35 +1000 Subject: dont panic when catting directories --- pkg/commands/git.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pkg/commands/git.go') diff --git a/pkg/commands/git.go b/pkg/commands/git.go index 1e36aa84c..b56650e97 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -86,16 +86,17 @@ func (c *GitCommand) GetStatusFiles() []File { change := statusString[0:2] stagedChange := change[0:1] unstagedChange := statusString[1:2] - filename := statusString[3:] + filename := c.OSCommand.Unquote(statusString[3:]) tracked := !includes([]string{"??", "A ", "AM"}, change) file := File{ - Name: c.OSCommand.Unquote(filename), + Name: filename, DisplayString: statusString, HasStagedChanges: !includes([]string{" ", "U", "?"}, stagedChange), HasUnstagedChanges: unstagedChange != " ", Tracked: tracked, Deleted: unstagedChange == "D" || stagedChange == "D", HasMergeConflicts: change == "UU", + Type: c.OSCommand.FileType(filename), } files = append(files, file) } -- cgit v1.2.3