mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-05 08:25:40 +00:00
the `podman save` command was failing on windows due to the use of a colon between the drive letter and first directory. the check was intended for Linux and not windows. Fixes #15247 [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
18 lines
363 B
Go
18 lines
363 B
Go
//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
|
|
}
|