Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idp: Create parent directories if they don't exist #2667

Merged
merged 1 commit into from
Oct 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions changelog/unreleased/idp-parent-dir.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion idp/pkg/service/v0/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down