From 8c8d96c2bc706f526bf60ac5c678d47edea87b71 Mon Sep 17 00:00:00 2001 From: Conrad Hoffmann Date: Mon, 28 Feb 2022 19:48:49 +0100 Subject: [PATCH] Fix conflation of URL and storage path The path returned must of course be the external URL path, not the internal storage path. --- storage/filesystem.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/filesystem.go b/storage/filesystem.go index dfbe372..081253e 100644 --- a/storage/filesystem.go +++ b/storage/filesystem.go @@ -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 }