Skip to content

Commit

Permalink
Fix escaped char bug in getCommitInfos (go-gitea#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethantkoenig authored and appleboy committed Jun 16, 2017
1 parent cff67d4 commit 2f740f2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tree_entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package git

import (
"fmt"
"os"
"path/filepath"
"sort"
Expand Down Expand Up @@ -254,6 +255,12 @@ func getNextCommitInfos(state *getCommitInfoState) error {
if path == "" {
break
}
if path[0] == '"' {
path, err = strconv.Unquote(path)
if err != nil {
return fmt.Errorf("Unquote: %v", err)
}
}
state.update(path)
}
i++ // skip blank line
Expand Down

0 comments on commit 2f740f2

Please sign in to comment.