Should now be able to handle spaces in filenames#227
Should now be able to handle spaces in filenames#227SteveSmith16384 wants to merge 1 commit intomaven-nar:masterfrom SteveSmith16384:handle-spaces-in-paths
Conversation
| // chmod +x file | ||
| final int result = runCommand("chmod", new String[] { | ||
| "+x", file.getPath() | ||
| "+x", file.getPath().replaceAll(" ", "\\ ") |
There was a problem hiding this comment.
Because chmod is called directly rather than using shell sh additional escaping or quoting for spaces shouldn't be required.
Was this required or "added for safety" ?
There was a problem hiding this comment.
I seem to remember this being required.
|
Thanks @SteveSmith16384 I'd really prefer to avoid managing quotes as it tends to get messier and messier as additional layers are added. But as sh is used it seems it has to be managed. Did a quick check of the regex used for splitting The following comments where interesting, do we need to account for unmatched quotes?
Thinking we need to make this new version of splitting space separated values into a util function as there seem to be additional locations to potentially fix. |
|
Kicking to unscheduled, since there seems to be no activity here. |
I've not been able to fully test this, as I don't use Maven NAR directly myself (only as part of a shared project). However, you might find the suggested changes useful.