Skip to content

EMSUSD-3783 properly quote file paths in interpreted commands - #4684

Merged
neilh-adsk merged 2 commits into
devfrom
bailp/EMSUSD-3783/bad-path-in-command
Jul 31, 2026
Merged

EMSUSD-3783 properly quote file paths in interpreted commands#4684
neilh-adsk merged 2 commits into
devfrom
bailp/EMSUSD-3783/bad-path-in-command

Conversation

@pierrebai-adsk

Copy link
Copy Markdown
Collaborator
  • Added quoteForCommand, quoteLayerIdentifierForCommand and quoteFilePathForCommand helper functions.
  • Some may seem unnecessary now, just making the code intention clearer and having possible future point for fixing other quoting problem we may find.
  • Using these quotation functions when creating commands for MEL.

- Added `quoteForCommand`, `quoteLayerIdentifierForCommand` and `quoteFilePathForCommand` helper functions.
- Some may seem unnecessary now, just making the code intention clearer and having possible future point for fixing other quoting problem we may find.
- Using these quotation functions when creating commands for MEL.
@pierrebai-adsk pierrebai-adsk added bug Something isn't working adsk Related to Autodesk plugin labels Jul 30, 2026
@pierrebai-adsk pierrebai-adsk self-assigned this Jul 30, 2026
cmd += " ";
cmd += quote(layer->GetIdentifier());
cmd += " ";
cmd += quoteForCommand(proxyShape);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Don't we need cmd += " "; after this line and line 298 similar to the old code? I don't see quoteForCommand adding a space after its command.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Every "quote" function adds a prefix space, so we don't need to add extra spaces.

@AramAzhari-adsk AramAzhari-adsk Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

all except -stichLayers

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ie in the for loop that's on line 288 the cmd -stichLayers is being added without a space, and the quote command isn't adding a space at the end.

End of iter 1: ... "proxy" "id1"
Iter 2 starts with cmd += "-stitchLayers "; → ... "id1"-stitchLayers

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, that one the original code put teh space AFTER stitchLayer and I missed it, good catch.

@pierrebai-adsk pierrebai-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Jul 31, 2026
@neilh-adsk
neilh-adsk merged commit 6dbcf98 into dev Jul 31, 2026
12 checks passed
@neilh-adsk
neilh-adsk deleted the bailp/EMSUSD-3783/bad-path-in-command branch July 31, 2026 15:24
@seando-adsk seando-adsk added workflows Related to in-context workflows and removed bug Something isn't working adsk Related to Autodesk plugin labels Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-merge Development process is finished, PR is ready for merge workflows Related to in-context workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants