|
|
@ -214,8 +214,10 @@ func GetContents(ctx context.Context, repo *repo_model.Repository, treePath, ref
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if submodule != nil && submodule.URL != "" {
|
|
|
|
contentsResponse.SubmoduleGitURL = &submodule.URL
|
|
|
|
contentsResponse.SubmoduleGitURL = &submodule.URL
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
// Handle links
|
|
|
|
// Handle links
|
|
|
|
if entry.IsRegular() || entry.IsLink() {
|
|
|
|
if entry.IsRegular() || entry.IsLink() {
|
|
|
|
downloadURL, err := url.Parse(repo.HTMLURL() + "/raw/" + url.PathEscape(string(refType)) + "/" + util.PathEscapeSegments(ref) + "/" + util.PathEscapeSegments(treePath))
|
|
|
|
downloadURL, err := url.Parse(repo.HTMLURL() + "/raw/" + url.PathEscape(string(refType)) + "/" + util.PathEscapeSegments(ref) + "/" + util.PathEscapeSegments(treePath))
|
|
|
|