summaryrefslogtreecommitdiff
path: root/local.go
diff options
context:
space:
mode:
authorNick White <git@njw.name>2020-12-04 17:12:59 +0000
committerNick White <git@njw.name>2020-12-04 17:12:59 +0000
commit4fcbfba65689dc5e8ad46ba467343d3da376d92a (patch)
tree86b2f7e7cba76aedb53c7fabe2f36252c8ad30c9 /local.go
parentcbe02a57377787cd34172453a477f68f200448e8 (diff)
Ensure mkdir will succeed in upload
Diffstat (limited to 'local.go')
-rw-r--r--local.go2
1 files changed, 1 insertions, 1 deletions
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)
}