Skip to content

Commit

Permalink
fix(windows): use proper relative prefix in windows
Browse files Browse the repository at this point in the history
Signed-off-by: manifestori <ori@manifestcyber.com>
  • Loading branch information
manifestori committed May 20, 2024
1 parent 0e46c1c commit b8d6f03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions builder/build_package.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ func BuildPackageSection(packageName string, dirRoot string, pathsIgnore []strin
newFilePatch := ""
if osType == "windows" {
if strings.HasPrefix(fp, dirRoot) {
newFilePatch = filepath.FromSlash("." + fp[dirRootLen:])
newFilePatch = filepath.FromSlash(".\\" + fp[dirRootLen:])
} else {
newFilePatch = filepath.FromSlash("." + fp)
newFilePatch = filepath.FromSlash(".\\" + fp)
}
} else {
newFilePatch = filepath.FromSlash("./" + fp)
Expand Down

0 comments on commit b8d6f03

Please sign in to comment.