mirror of
https://github.com/containers/podman.git
synced 2025-05-22 01:27:07 +08:00

Based on WSL2 9p support: remaps windows paths to /mnt/<drive> locations for both podman and Docker API clients. Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
25 lines
385 B
Go
25 lines
385 B
Go
package specgen
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/containers/common/pkg/machine"
|
|
)
|
|
|
|
func shouldResolveWinPaths() bool {
|
|
return machine.MachineHostType() == "wsl"
|
|
}
|
|
|
|
func shouldResolveUnixWinVariant(path string) bool {
|
|
_, err := os.Stat(path)
|
|
return err != nil
|
|
}
|
|
|
|
func resolveRelativeOnWindows(path string) string {
|
|
return path
|
|
}
|
|
|
|
func winPathExists(path string) bool {
|
|
return false
|
|
}
|