summaryrefslogtreecommitdiff
path: root/cmd/podman/parse/parse.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/parse/parse.go')
-rw-r--r--cmd/podman/parse/parse.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/cmd/podman/parse/parse.go b/cmd/podman/parse/parse.go
new file mode 100644
index 000000000..47db066d3
--- /dev/null
+++ b/cmd/podman/parse/parse.go
@@ -0,0 +1,18 @@
+//go:build !windows
+// +build !windows
+
+package parse
+
+import (
+ "fmt"
+ "strings"
+)
+
+// ValidateFileName returns an error if filename contains ":"
+// as it is currently not supported
+func ValidateFileName(filename string) error {
+ if strings.Contains(filename, ":") {
+ return fmt.Errorf("invalid filename (should not contain ':') %q", filename)
+ }
+ return nil
+}