Skip to content

Commit d513628

Browse files
authored
Allow empty Conan files (#27092)
Fixes #27090 Looks like the Conan upload process has changed since last year. The empty uploads don't occur anymore.
1 parent e5ec57c commit d513628

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

routers/api/packages/conan/conan.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -326,13 +326,8 @@ func uploadFile(ctx *context.Context, fileFilter container.Set[string], fileKey
326326
}
327327
defer buf.Close()
328328

329-
if buf.Size() == 0 {
330-
// ignore empty uploads, second request contains content
331-
jsonResponse(ctx, http.StatusOK, nil)
332-
return
333-
}
334-
335329
isConanfileFile := filename == conanfileFile
330+
isConaninfoFile := filename == conaninfoFile
336331

337332
pci := &packages_service.PackageCreationInfo{
338333
PackageInfo: packages_service.PackageInfo{
@@ -364,7 +359,7 @@ func uploadFile(ctx *context.Context, fileFilter container.Set[string], fileKey
364359
pfci.Properties[conan_module.PropertyPackageRevision] = pref.RevisionOrDefault()
365360
}
366361

367-
if isConanfileFile || filename == conaninfoFile {
362+
if isConanfileFile || isConaninfoFile {
368363
if isConanfileFile {
369364
metadata, err := conan_module.ParseConanfile(buf)
370365
if err != nil {

0 commit comments

Comments
 (0)