Windows: --code
flag cannot accept paths with single quote (')
#60120
Labels
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
What is the bug or the crash?
The
--code
flag, passed toqgis.exe
, is meant to make QGIS execute a Python script after starting up. However, if the argument of--code
has the'
character, QGIS isn't able to open the script. It seems that QGIS doesn't properly escape the filename.Steps to reproduce the issue
'
character, for examplehawai'i.py
.--code
argument, .e.g"C:\\Program Files\\QGIS 3.40.2\\bin\\qgis-bin.exe" --code "hawai'i.py"
.Versions
Supported QGIS version
New profile
Additional context
QGIS ought to correctly escape the filename before plonking it into Python code.
The text was updated successfully, but these errors were encountered: