diff options
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/runtime.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go index 9afa1bc10..8b5bc32b4 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -472,6 +472,15 @@ func makeRuntime(runtime *Runtime) (err error) { runtime.config.ConmonPath) } + // Make the static files directory if it does not exist + if err := os.MkdirAll(runtime.config.StaticDir, 0700); err != nil { + // The directory is allowed to exist + if !os.IsExist(err) { + return errors.Wrapf(err, "error creating runtime static files directory %s", + runtime.config.StaticDir) + } + } + // Set up the state switch runtime.config.StateType { case InMemoryStateStore: @@ -601,15 +610,6 @@ func makeRuntime(runtime *Runtime) (err error) { } runtime.ociRuntime = ociRuntime - // Make the static files directory if it does not exist - if err := os.MkdirAll(runtime.config.StaticDir, 0755); err != nil { - // The directory is allowed to exist - if !os.IsExist(err) { - return errors.Wrapf(err, "error creating runtime static files directory %s", - runtime.config.StaticDir) - } - } - // Make a directory to hold container lockfiles lockDir := filepath.Join(runtime.config.TmpDir, "lock") if err := os.MkdirAll(lockDir, 0755); err != nil { |