aboutsummaryrefslogtreecommitdiffstats
path: root/services/repository/files/content.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/repository/files/content.go')
-rw-r--r--services/repository/files/content.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/repository/files/content.go b/services/repository/files/content.go
index 7a07a0ddca..ccba3b7594 100644
--- a/services/repository/files/content.go
+++ b/services/repository/files/content.go
@@ -42,7 +42,7 @@ func GetContentsOrList(ctx context.Context, repo *repo_model.Repository, refComm
}
// Check that the path given in opts.treePath is valid (not a git path)
- cleanTreePath := CleanUploadFileName(treePath)
+ cleanTreePath := CleanGitTreePath(treePath)
if cleanTreePath == "" && treePath != "" {
return nil, ErrFilenameInvalid{
Path: treePath,
@@ -103,7 +103,7 @@ func GetObjectTypeFromTreeEntry(entry *git.TreeEntry) ContentType {
// GetContents gets the metadata on a file's contents. Ref can be a branch, commit or tag
func GetContents(ctx context.Context, repo *repo_model.Repository, refCommit *utils.RefCommit, treePath string, forList bool) (*api.ContentsResponse, error) {
// Check that the path given in opts.treePath is valid (not a git path)
- cleanTreePath := CleanUploadFileName(treePath)
+ cleanTreePath := CleanGitTreePath(treePath)
if cleanTreePath == "" && treePath != "" {
return nil, ErrFilenameInvalid{
Path: treePath,