mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-03-09 07:18:40 -05:00
precreate folders to json files
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"os"
|
||||
"os/signal"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/cs3org/reva/cmd/revad/runtime"
|
||||
@@ -67,6 +68,13 @@ func AuthBasic(cfg *config.Config) *cli.Command {
|
||||
|
||||
defer cancel()
|
||||
|
||||
// precreate folders
|
||||
if cfg.Reva.AuthProvider.Driver == "json" && cfg.Reva.AuthProvider.JSON != "" {
|
||||
if err := os.MkdirAll(filepath.Dir(cfg.Reva.AuthProvider.JSON), os.ModeExclusive); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
uuid := uuid.Must(uuid.NewV4())
|
||||
|
||||
Reference in New Issue
Block a user