Revert the usage of home.GetConfigHome()

Although this might be the correct thing to do,
the idea is to keep the same behaviour across all three locations,
and change all three at once.

See https://github.com/containers/podman/pull/19231#discussion_r1265602832

[NO NEW TESTS NEEDED]

Signed-off-by: Ismael Arias <ismaelariasmn@gmail.com>
This commit is contained in:
Ismael Arias
2023-07-17 18:29:06 +02:00
parent 47997857ff
commit 5c0912b07b

View File

@ -60,8 +60,7 @@ func DefaultPolicyPath(sys *types.SystemContext) string {
return sys.SignaturePolicyPath
}
confDir, _ := homedir.GetConfigHome()
userPolicyFilePath := filepath.Join(confDir, filepath.FromSlash("containers/policy.json"))
userPolicyFilePath := filepath.Join(homedir.Get(), filepath.FromSlash(".config/containers/policy.json"))
_, err := os.Stat(userPolicyFilePath)
if err == nil {
return userPolicyFilePath