tadayosi commented on code in PR #3363:
URL: https://github.com/apache/camel-k/pull/3363#discussion_r899071640


##########
pkg/resources/resources_support.go:
##########
@@ -104,7 +104,7 @@ func WithPrefix(pathPrefix string) ([]string, error) {
 
        var res []string
        for i := range paths {
-               path := fixPath(paths[i])
+               path := filepath.FromSlash(paths[i])

Review Comment:
   Thanks, looks great. But shouldn't this be `filepath.ToSlash()`?



##########
pkg/resources/resources_support.go:
##########
@@ -149,10 +149,6 @@ func Resources(dirName string) ([]string, error) {
        return res, dir.Close()
 }
 
-func fixPath(path string) string {
-       if runtime.GOOS == "windows" {
-               path = strings.ReplaceAll(path, "\\", "/")
-       }
-
-       return path
+func openAsset(path string) (http.File, error) {
+       return assets.Open(filepath.FromSlash(path))

Review Comment:
   ditto



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to