Skip to content

Commit

Permalink
add filepath.ToSlash to cleanGeneratorFileName (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
asahasrabuddhe authored Nov 11, 2021
1 parent 579bb03 commit 1635a6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion artifact.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ func cleanGeneratorFileName(name string) (string, error) {
return "", errors.New("generator file names must be relative paths")
}

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

Expand Down

0 comments on commit 1635a6b

Please sign in to comment.