From 4abbe16f3bb51af33d9f888646bd429b3c1f5f85 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Tue, 25 Aug 2020 21:28:07 +0200 Subject: [PATCH] fix windows containers.conf path customConfigFile() has to return the full path to the file LOCALAPPDATA only returns a directory. I also recommend using APPDATA instead of LOCALAPPDATA. If a domain user would logon to a new computer they would automatically have their containers.conf from the last login at a different pc. No manual copy is needed since windows syncs the APPDATA dir by default in a domain environment at login. So the config file path on windows would be: `C:\Users\\AppData\Roaming\containers\containers.conf` Signed-off-by: Paul Holzinger --- common/pkg/config/config_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/pkg/config/config_windows.go b/common/pkg/config/config_windows.go index 7dbd665bb1..1c9806e6b5 100644 --- a/common/pkg/config/config_windows.go +++ b/common/pkg/config/config_windows.go @@ -6,5 +6,5 @@ func customConfigFile() (string, error) { if path, found := os.LookupEnv("CONTAINERS_CONF"); found { return path, nil } - return os.Getenv("LOCALAPPDATA"), nil + return os.Getenv("APPDATA") + "\\containers\\containers.conf", nil }