mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-11 03:11:50 +00:00
Fixes Issue#1435.
Signed-off-by: Christoph Fiehe <christoph.fiehe@eurodata.de>
This commit is contained in:
@@ -338,7 +338,7 @@ func (storage *PublishedStorage) LinkFromPool(publishedPrefix, publishedRelPath,
|
||||
poolPath := filepath.Join(storage.prefix, relPath)
|
||||
|
||||
if storage.pathCache == nil {
|
||||
paths, md5s, err := storage.internalFilelist(filepath.Join(storage.prefix, publishedPrefix, "pool"), true)
|
||||
paths, md5s, err := storage.internalFilelist(filepath.Join(publishedPrefix, "pool"), true)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "error caching paths under prefix")
|
||||
}
|
||||
@@ -346,7 +346,7 @@ func (storage *PublishedStorage) LinkFromPool(publishedPrefix, publishedRelPath,
|
||||
storage.pathCache = make(map[string]string, len(paths))
|
||||
|
||||
for i := range paths {
|
||||
storage.pathCache[paths[i]] = md5s[i]
|
||||
storage.pathCache[filepath.Join("pool", paths[i])] = md5s[i]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -370,7 +370,7 @@ func (s *PublishedStorageSuite) TestLinkFromPoolCache(c *C) {
|
||||
|
||||
// Check only one listing request was done to the server
|
||||
s.checkGetRequestsEqual(c, "/test?", []string{
|
||||
"/test?list-type=2&max-keys=1000&prefix=lala%2Flala%2Fpool%2F",
|
||||
"/test?list-type=2&max-keys=1000&prefix=lala%2Fpool%2F",
|
||||
})
|
||||
|
||||
// Publish two packages at a prefixed storage plus a publish prefix.
|
||||
|
||||
Reference in New Issue
Block a user