Skip to content

Commit

Permalink
Merge pull request #4 from ThreeDotsLabs/filepath-toslash
Browse files Browse the repository at this point in the history
Normalize file paths to slashes
  • Loading branch information
m110 authored May 21, 2022
2 parents 586349c + fcc9ed1 commit bfa51bc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion trainings/files/read.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ func (f Files) ReadSolutionFiles(trainingRootFs afero.Fs, dir string) ([]*genpro
return nil, err
}

// Normalize filepath to slashes
slashPath := filepath.ToSlash(relPath)

files = append(files, &genproto.File{
Path: relPath,
Path: slashPath,
Content: string(content),
})
}
Expand Down

0 comments on commit bfa51bc

Please sign in to comment.