summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2022-08-05 21:00:47 +0200
committerGitHub <noreply@github.com>2022-08-05 15:00:47 -0400
commitbaf374a3a4a36118a65db86943896a8e4d01557b (patch)
tree8cc38de7dfd079d4aafed1b412b741e5f4679e47 /routers
parentd890f0d38c89fcb93f77535b6ab6e99f1df20874 (diff)
downloadgitea-baf374a3a4a36118a65db86943896a8e4d01557b.tar.gz
gitea-baf374a3a4a36118a65db86943896a8e4d01557b.zip
Allow multiple metadata files for Maven packages (#20674)
* Allow file overwrite for meta files. * Added tests. * lint Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'routers')
-rw-r--r--routers/api/packages/maven/maven.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/routers/api/packages/maven/maven.go b/routers/api/packages/maven/maven.go
index bba4babf04..072a15f95c 100644
--- a/routers/api/packages/maven/maven.go
+++ b/routers/api/packages/maven/maven.go
@@ -266,8 +266,9 @@ func UploadPackageFile(ctx *context.Context) {
PackageFileInfo: packages_service.PackageFileInfo{
Filename: params.Filename,
},
- Data: buf,
- IsLead: false,
+ Data: buf,
+ IsLead: false,
+ OverwriteExisting: params.IsMeta,
}
// If it's the package pom file extract the metadata