Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Replace each backslash in path with a slash #825

Merged
merged 2 commits into from
Sep 26, 2021
Merged

fix: Replace each backslash in path with a slash #825

merged 2 commits into from
Sep 26, 2021

Conversation

JinnyYi
Copy link
Contributor

@JinnyYi JinnyYi commented Sep 26, 2021

No description provided.

@@ -529,7 +529,7 @@ If user enable this feature, service should ignore not support pair error.`),
continue
}
if v.Name == "path" || v.Name == "src" || v.Name == "dst" || v.Name == "target" {
ic.AddParameter(gg.S("filepath.ToSlash(%s)", v.Name))
ic.AddParameter(gg.S("strings.ReplaceAll(%s, \"\\\\\", \"/\")", v.Name))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can use

gg.S(`strings.ReplaceAll(%s, "\\", "/")`, v.Name)

tom improve the readability?

@Xuanwo Xuanwo merged commit 4956683 into master Sep 26, 2021
@Xuanwo Xuanwo deleted the gsp-749 branch September 26, 2021 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants