From 4fcbfba65689dc5e8ad46ba467343d3da376d92a Mon Sep 17 00:00:00 2001 From: Nick White Date: Fri, 4 Dec 2020 17:12:59 +0000 Subject: Ensure mkdir will succeed in upload --- local.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'local.go') diff --git a/local.go b/local.go index e66f477..0fceca2 100644 --- a/local.go +++ b/local.go @@ -222,7 +222,7 @@ func (a *LocalConn) Download(bucket string, key string, path string) error { // Upload just copies the file from path to TempDir/bucket/key func (a *LocalConn) Upload(bucket string, key string, path string) error { d := filepath.Join(a.TempDir, bucket, filepath.Dir(key)) - err := os.Mkdir(d, 0700) + err := os.MkdirAll(d, 0700) if err != nil && !os.IsExist(err) { return fmt.Errorf("Error creating temporary directory: %v", err) } -- cgit v1.2.1-24-ge1ad