Fix conflation of URL and storage path

The path returned must of course be the external URL path, not the
internal storage path.
This commit is contained in:
Conrad Hoffmann 2022-02-28 19:48:49 +01:00
parent 0f2356f42d
commit 8c8d96c2bc

View File

@ -214,8 +214,8 @@ func (b *filesystemBackend) PutAddressObject(ctx context.Context, path string, c
if err != nil {
return "", err
}
path = filepath.Join(basePath, path)
f, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE, 0644)
internalPath := filepath.Join(basePath, path)
f, err := os.OpenFile(internalPath, os.O_RDWR|os.O_CREATE, 0644)
if err != nil {
return "", err
}