From 4c12abfa3c9a9404bfc4c3f178a1577a02a485d5 Mon Sep 17 00:00:00 2001 From: Sebastian Soto <ssoto@redhat.com> Date: Sat, 8 Mar 2025 11:08:54 -0500 Subject: [PATCH] Fix getLibpodTmpDir() on Windows Changes the function to return an absolute path to a temporary directory. Without this, EngineConfig.Validate() will return an error on Windows when using the default values, as /run/libpod is not an absolute directory on Windows. As C:\run is not a temporary directory on Windows, changes the path to be within the Temp folder. Signed-off-by: Sebastian Soto <ssoto@redhat.com> --- pkg/config/default_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/config/default_windows.go b/pkg/config/default_windows.go index 610aa122b..395b59fbd 100644 --- a/pkg/config/default_windows.go +++ b/pkg/config/default_windows.go @@ -38,7 +38,7 @@ func getDefaultLockType() string { } func getLibpodTmpDir() string { - return "/run/libpod" + return filepath.Join(getDefaultTmpDir(), "libpod") } // getDefaultMachineVolumes returns default mounted volumes (possibly with env vars, which will be expanded)