diff options
author | Nick White <git@njw.name> | 2020-12-04 17:12:59 +0000 |
---|---|---|
committer | Nick White <git@njw.name> | 2020-12-04 17:12:59 +0000 |
commit | 4fcbfba65689dc5e8ad46ba467343d3da376d92a (patch) | |
tree | 86b2f7e7cba76aedb53c7fabe2f36252c8ad30c9 /local.go | |
parent | cbe02a57377787cd34172453a477f68f200448e8 (diff) |
Ensure mkdir will succeed in upload
Diffstat (limited to 'local.go')
-rw-r--r-- | local.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) } |