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: fix bug for files with special chars &() #1584

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

andreynering
Copy link
Member

@andreynering andreynering commented Apr 9, 2024

Fixes #1551

@andreynering andreynering added the type: bug Something not working as intended. label Apr 9, 2024
@andreynering andreynering self-assigned this Apr 9, 2024
@andreynering andreynering linked an issue Apr 9, 2024 that may be closed by this pull request
@andreynering andreynering enabled auto-merge (squash) April 9, 2024 02:07
@andreynering andreynering merged commit eb2783f into main Apr 9, 2024
13 checks passed
@andreynering andreynering deleted the bug/fix-special-file-char branch April 9, 2024 02:08
Comment on lines +106 to +108
s = strings.ReplaceAll(s, "&", `\&`)
s = strings.ReplaceAll(s, "(", `\(`)
s = strings.ReplaceAll(s, ")", `\)`)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this not do something along the lines of "shell quote the string"? Instead of escaping individual characters one at a time?

@vergenzt vergenzt mentioned this pull request Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something not working as intended.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Having & in Directory name causing problems.
2 participants