Skip to content

Commit 2f740f2

Browse files
ethantkoenigappleboy
authored andcommitted
Fix escaped char bug in getCommitInfos (go-gitea#64)
1 parent cff67d4 commit 2f740f2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tree_entry.go

+7
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
package git
66

77
import (
8+
"fmt"
89
"os"
910
"path/filepath"
1011
"sort"
@@ -254,6 +255,12 @@ func getNextCommitInfos(state *getCommitInfoState) error {
254255
if path == "" {
255256
break
256257
}
258+
if path[0] == '"' {
259+
path, err = strconv.Unquote(path)
260+
if err != nil {
261+
return fmt.Errorf("Unquote: %v", err)
262+
}
263+
}
257264
state.update(path)
258265
}
259266
i++ // skip blank line

0 commit comments

Comments
 (0)