summaryrefslogtreecommitdiffstats
path: root/vendor/code.gitea.io/git/tree_entry.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/code.gitea.io/git/tree_entry.go')
-rw-r--r--vendor/code.gitea.io/git/tree_entry.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/vendor/code.gitea.io/git/tree_entry.go b/vendor/code.gitea.io/git/tree_entry.go
index 7f454ab56c..079dfddd63 100644
--- a/vendor/code.gitea.io/git/tree_entry.go
+++ b/vendor/code.gitea.io/git/tree_entry.go
@@ -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