forked from containers/podman
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 containers#15247 [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude <[email protected]>
- Loading branch information
Showing
3 changed files
with
23 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package parse | ||
|
||
func ValidateFileName(filename string) error { | ||
return nil | ||
} |