Skip to content

Commit

Permalink
Merge pull request #1080 from rhatdan/storage.conf
Browse files Browse the repository at this point in the history
Reset defaultConfigFile if defaultOverrideConfigFile exits.
  • Loading branch information
flouthoc authored Nov 30, 2021
2 parents f84b05e + 0baf764 commit 1a158c8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions types/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ func init() {
defaultStoreOptions.GraphDriverName = ""

if _, err := os.Stat(defaultOverrideConfigFile); err == nil {
// The DefaultConfigFile(rootless) function returns the path
// of the used storage.conf file, by returning defaultConfigFile
// If override exists containers/storage uses it by default.
defaultConfigFile = defaultOverrideConfigFile
ReloadConfigurationFileIfNeeded(defaultOverrideConfigFile, &defaultStoreOptions)
} else {
if !os.IsNotExist(err) {
Expand Down

0 comments on commit 1a158c8

Please sign in to comment.