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

[App] Allow to use single quotes in file name with the --code command line option (Fix #60120) #60121

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

agiudiceandrea
Copy link
Contributor

Description

Properly escapes the single quotes in file name since it is wrapped in single quotes in the Python command run by QgsPythonRunner.

Fixes #60120.

@github-actions github-actions bot added this to the 3.42.0 milestone Jan 12, 2025
@agiudiceandrea agiudiceandrea added Bug Either a bug report, or a bug fix. Let's hope for the latter! backport release-3_34 backport release-3_40 and removed backport release-3_34 labels Jan 12, 2025
Copy link

github-actions bot commented Jan 12, 2025

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit a4bae25)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit a4bae25)

@agiudiceandrea agiudiceandrea changed the title [App] Allow to use single quotes in file name passed to the --code command line option (Fix #60120) [App] Allow to use single quotes in file name with the --code command line option (Fix #60120) Jan 12, 2025
@btzy
Copy link

btzy commented Jan 13, 2025

I think we should either use some proper escaping function in Qt, or write something to escape all non-printable characters too. Apparently on Linux, filenames can contain almost all non-printable characters, and they will also cause a problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release-3_40 Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows: --code flag cannot accept paths with single quote (')
3 participants