From ef597f6fe45cae8b3ba405ff89f5b20bfbf349e5 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Thu, 7 Dec 2017 15:56:14 -0500 Subject: PLT-8314: Test Message Export Against S3 Bucket (#7957) * Removed export directory config setting, in favour of hard-coding it to an 'export' directory under the local file directory. Improved the local file backend copy implementation to implicitly create the destination directory if it's missing * Fixed the tests --- utils/file.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'utils/file.go') diff --git a/utils/file.go b/utils/file.go index 13b25bdab..923c559cc 100644 --- a/utils/file.go +++ b/utils/file.go @@ -21,6 +21,9 @@ func CopyFile(src, dst string) (err error) { } defer in.Close() + if err = os.MkdirAll(filepath.Dir(dst), os.ModePerm); err != nil { + return + } out, err := os.Create(dst) if err != nil { return -- cgit v1.2.3-1-g7c22