From 12e2982362a7aad43ceaad6f393859984b67939a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Jedin=C3=BD?= Date: Wed, 17 Jan 2018 13:39:01 +0100 Subject: [PATCH] S3 SymLink fix The copy source should be the name of the source bucket and key name of the source object, separated by a slash (/). --- AUTHORS | 3 ++- s3/public.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index 9fa9de8b..cfb7d31c 100644 --- a/AUTHORS +++ b/AUTHORS @@ -29,4 +29,5 @@ List of contributors, in chronological order: * Clemens Rabe (https://github.com/seeraven) * TJ Merritt (https://github.com/tjmerritt) * Matt Martyn (https://github.com/MMartyn) -* Ludovico Cavedon (https://github.com/cavedon) \ No newline at end of file +* Ludovico Cavedon (https://github.com/cavedon) +* Petr Jediny (https://github.com/pjediny) \ No newline at end of file diff --git a/s3/public.go b/s3/public.go index ba3695c3..15c4fec9 100644 --- a/s3/public.go +++ b/s3/public.go @@ -393,7 +393,7 @@ func (storage *PublishedStorage) SymLink(src string, dst string) error { params := &s3.CopyObjectInput{ Bucket: aws.String(storage.bucket), - CopySource: aws.String(filepath.Join(storage.prefix, src)), + CopySource: aws.String(filepath.Join(storage.bucket, storage.prefix, src)), Key: aws.String(filepath.Join(storage.prefix, dst)), ACL: aws.String(storage.acl), Metadata: map[string]*string{