Files
podman/pkg/specgen/winpath_windows.go
Matt Heon ec68f07c04 Fix Lint on Windows and enable the job
[NO NEW TESTS NEEDED] Purely refactoring

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-02-20 08:06:18 -05:00

32 lines
509 B
Go

package specgen
import (
"os"
"path/filepath"
"github.com/sirupsen/logrus"
)
func shouldResolveUnixWinVariant(path string) bool {
return true
}
func shouldResolveWinPaths() bool {
return true
}
func resolveRelativeOnWindows(path string) string {
ret, err := filepath.Abs(path)
if err != nil {
logrus.Debugf("problem resolving possible relative path %q: %s", path, err.Error())
return path
}
return ret
}
func winPathExists(path string) bool {
_, err := os.Stat(path)
return err == nil
}