mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-12 06:30:35 +00:00
Fix bug with PoolPath field being overwritten on mirror update
While updating mirror, if package file is already in pool path, field `PoolPath` was left as empty which results in package file being unavailable later on while publishing.
This commit is contained in:
+4
-3
@@ -629,14 +629,15 @@ type PackageDownloadTask struct {
|
||||
func (p *Package) DownloadList(packagePool aptly.PackagePool, checksumStorage aptly.ChecksumStorage) (result []PackageDownloadTask, err error) {
|
||||
result = make([]PackageDownloadTask, 0, 1)
|
||||
|
||||
for idx, f := range p.Files() {
|
||||
verified, err := f.Verify(packagePool, checksumStorage)
|
||||
files := p.Files()
|
||||
for idx := range files {
|
||||
verified, err := files[idx].Verify(packagePool, checksumStorage)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if !verified {
|
||||
result = append(result, PackageDownloadTask{File: &p.Files()[idx]})
|
||||
result = append(result, PackageDownloadTask{File: &files[idx]})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user