mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-03-04 07:17:16 -05:00
Merge pull request #2667 from rhafer/mkdir-idp
idp: Create parent directories if they don't exist
This commit is contained in:
6
changelog/unreleased/idp-parent-dir.md
Normal file
6
changelog/unreleased/idp-parent-dir.md
Normal 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
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user