Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1635a6b

Browse files
add filepath.ToSlash to cleanGeneratorFileName (#97)
1 parent 579bb03 commit 1635a6b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

artifact.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ func cleanGeneratorFileName(name string) (string, error) {
304304
return "", errors.New("generator file names must be relative paths")
305305
}
306306

307-
if name = filepath.Clean(name); name == "." || strings.HasPrefix(name, "..") {
307+
if name = filepath.ToSlash(filepath.Clean(name)); name == "." || strings.HasPrefix(name, "..") {
308308
return "", errors.New("generator file names must be not contain . or .. within them")
309309
}
310310

0 commit comments

Comments
 (0)