mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-27 13:57:46 +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:
@@ -27,7 +27,12 @@ type PackageFile struct {
|
||||
|
||||
// Verify that package file is present and correct
|
||||
func (f *PackageFile) Verify(packagePool aptly.PackagePool, checksumStorage aptly.ChecksumStorage) (bool, error) {
|
||||
return packagePool.Verify(f.PoolPath, f.Filename, &f.Checksums, checksumStorage)
|
||||
generatedPoolPath, exists, err := packagePool.Verify(f.PoolPath, f.Filename, &f.Checksums, checksumStorage)
|
||||
if exists && err == nil {
|
||||
f.PoolPath = generatedPoolPath
|
||||
}
|
||||
|
||||
return exists, err
|
||||
}
|
||||
|
||||
// GetPoolPath returns path to the file in the pool
|
||||
|
||||
Reference in New Issue
Block a user