If local storage file exists, then use it rather then defaults.

Currently we always force overlay if it exists even though a user might want
vfs.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2019-01-03 16:18:14 -05:00
parent 098c13418a
commit b0fcd555db

View File

@ -316,6 +316,7 @@ func GetDefaultStoreOptions() (storage.StoreOptions, string, error) {
storageConf := filepath.Join(os.Getenv("HOME"), ".config/containers/storage.conf")
if _, err := os.Stat(storageConf); err == nil {
storageOpts = storage.StoreOptions{}
storage.ReloadConfigurationFile(storageConf, &storageOpts)
} else if os.IsNotExist(err) {
os.MkdirAll(filepath.Dir(storageConf), 0755)