summaryrefslogtreecommitdiff
path: root/pkg/specgen/winpath_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/specgen/winpath_windows.go')
-rw-r--r--pkg/specgen/winpath_windows.go30
1 files changed, 30 insertions, 0 deletions
diff --git a/pkg/specgen/winpath_windows.go b/pkg/specgen/winpath_windows.go
new file mode 100644
index 000000000..c6aad314a
--- /dev/null
+++ b/pkg/specgen/winpath_windows.go
@@ -0,0 +1,30 @@
+package specgen
+
+import (
+ "github.com/sirupsen/logrus"
+ "os"
+ "path/filepath"
+)
+
+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
+}