Merge pull request #2667 from rhafer/mkdir-idp

idp: Create parent directories if they don't exist
This commit is contained in:
David Christofas authored and GitHub committed 2021-10-22 17:41:12 +02:00
commit e146b03aef
2 files changed
+7 -1

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
Bugfix: Create parent directories for idp configuration
The parent directories of the identifier-registration.yaml config file might
not exist when starting idp. Create them, when that is the case.
https://github.com/owncloud/ocis/issues/2667
+1 -1
View File
@@ -73,7 +73,7 @@ func createConfigsIfNotExist(assets http.FileSystem, filePath, ocisURL string) e
folder := path.Dir(filePath)
if _, err := os.Stat(folder); os.IsNotExist(err) {
if err := os.Mkdir(folder, 0700); err != nil {
if err := os.MkdirAll(folder, 0700); err != nil {
return err
}
}