diff --git a/libs/git/info.go b/libs/git/info.go index 01779da774..8523df24a2 100644 --- a/libs/git/info.go +++ b/libs/git/info.go @@ -136,7 +136,10 @@ func fetchRepositoryInfoDotGit(ctx context.Context, path string) (RepositoryInfo } func FindLeafInTree(p string, leafName string) (string, error) { - var err error + p, err := filepath.Abs(p) + if err != nil { + return "", err + } for i := 0; i < 10000; i++ { _, err = os.Stat(filepath.Join(p, leafName))