s3: call s3.ListFiles only on publish path in LinkFromPool

instead of caching the whole s3 bucket, cache only the pool path. this
requires an additional parameter, and since this is an interface, all
implementations need to follow. might help in other backends too.

closes #1181
This commit is contained in:
André Roth committed 2024-02-06 20:49:35 +01:00
1 parent e61a4dd53c
commit 01893a492f
6 files changed
+11 -9

No files matched your search

+1 -3
View File
@@ -621,9 +621,7 @@ func (p *Package) LinkFromPool(publishedStorage aptly.PublishedStorage, packageP
return err
}
publishedDirectory := filepath.Join(prefix, relPath)
err = publishedStorage.LinkFromPool(publishedDirectory, f.Filename, packagePool, sourcePoolPath, f.Checksums, force)
err = publishedStorage.LinkFromPool(prefix, relPath, f.Filename, packagePool, sourcePoolPath, f.Checksums, force)
if err != nil {
return err
}