]> source.dussan.org Git - gitea.git/commitdiff
Fix GetContents(): Dont't ignore Executables (#11192) (#11209)
author6543 <6543@obermui.de>
Sat, 25 Apr 2020 04:54:38 +0000 (06:54 +0200)
committerGitHub <noreply@github.com>
Sat, 25 Apr 2020 04:54:38 +0000 (01:54 -0300)
modules/repofiles/content.go

index aed98c33a8c4a66c392670cf370a451935c68239..838bfabdc6b88a962f36f78370c4d62f6e030c60 100644 (file)
@@ -159,7 +159,7 @@ func GetContents(repo *models.Repository, treePath, ref string, forList bool) (*
        }
 
        // Now populate the rest of the ContentsResponse based on entry type
-       if entry.IsRegular() {
+       if entry.IsRegular() || entry.IsExecutable() {
                contentsResponse.Type = string(ContentTypeRegular)
                if blobResponse, err := GetBlobBySHA(repo, entry.ID.String()); err != nil {
                        return nil, err