Update code.gitea.io/git

This commit is contained in:
Antoine GIRARD 2017-06-06 19:36:48 +02:00
parent f6b58964d7
commit 0cf89a83c1
No known key found for this signature in database
GPG key ID: AE8255B8A0D828E4
3 changed files with 24 additions and 71 deletions

View file

@ -5,6 +5,7 @@
package git
import (
"os"
"path/filepath"
"sort"
"strconv"
@ -215,7 +216,7 @@ func (state *getCommitInfoState) update(path string) error {
return nil
}
var entryPath string
if index := strings.IndexRune(relPath, '/'); index >= 0 {
if index := strings.IndexRune(relPath, os.PathSeparator); index >= 0 {
entryPath = filepath.Join(state.treePath, relPath[:index])
} else {
entryPath = path