Fixes "mkdir /basedir: no such file or directory" by creating the directory recursively

This commit is contained in:
Douglas Pessoa 2019-08-23 20:44:35 +00:00
parent b9a03ac180
commit 6c73f13fd0

View File

@ -106,7 +106,7 @@ func (s *LocalStorage) Put(token string, filename string, reader io.Reader, cont
path := filepath.Join(s.basedir, token)
if err = os.Mkdir(path, 0700); err != nil && !os.IsExist(err) {
if err = os.MkdirAll(path, 0700); err != nil && !os.IsExist(err) {
return err
}