Skip to content

Conversation

@Linguz
Copy link

@Linguz Linguz commented Oct 7, 2024

When the parameters are parsed, it uses " " to split the parameters. This currently causes a file named as such: "C:\Users\Linguz\My Files\etc.txt" to be split incorrectly.

Currently, it would put "path" into paramName (as expected), but it would put "C:\Users\Linguz\My" into paramValue, which is an incomplete path. By using the Split overload, we can cap the number of splits into two: path/url (paramName) and then everything else.

Purpose

  • This change resolves a problem that occurs when the localfile path has a space in it anywhere.

Does this introduce a breaking change?

[ ] Yes
[X] No

Pull Request Type

What kind of change does this Pull Request introduce?

[X] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code
    Try to run a file through the system with space in its path, such as "C:\Users\Linguz\My Files\etc.txt".

What to Check

Verify that the following are valid

  • The file is able to be read properly.

Other Information

When the parameters are parsed, it used " " to split the parameters. This currently causes a file named as such: "C:\Users\Linguz\My Files\etc.txt" to be split incorrectly. 
Currently, it would put "path" into paramName (as expected), but it would put "C:\Users\Linguz\My" into paramValue, which is an incomplete path. By using the Split overload, we can cap the number of splits into two: path/url (paramName) and then everything else.
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.

1 participant