diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2022-08-05 21:00:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-05 15:00:47 -0400 |
commit | baf374a3a4a36118a65db86943896a8e4d01557b (patch) | |
tree | 8cc38de7dfd079d4aafed1b412b741e5f4679e47 /routers | |
parent | d890f0d38c89fcb93f77535b6ab6e99f1df20874 (diff) | |
download | gitea-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.go | 5 |
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 |