idp: Create parent directories if they don't exist

The parent directories of the identifier-registration.yaml config file might
not exist when starting idp. So instead of creating just the top most
directory use MkdirAll to also create the parents.
This commit is contained in:
Ralf Haferkamp committed 2021-10-22 16:35:59 +02:00
1 parent 46ce7b88eb
commit 9e8231ab01
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
}
}