valhallasw created this task.
valhallasw added a subscriber: valhallasw.
valhallasw added a project: pywikibot-core.
TASK DESCRIPTION
e.g.
```
editor=r'C:/Program Files (x86)/Notepad++/notepad++.exe'
```
would run
```
os.system(r'C:/Program Files (x86)/Notepad++/notepad++.exe -n0 tempfilename')
```
which is interpreted as 'run `c:/program` with arguments `Files`, `(x86)`,
...'.
We should probably switch to subprocess.Popen, and pass the extra parameters as a tuple,
i.e., as
```
subprocess.Popen((r'C:/Program Files (x86)/Notepad++/notepad++.exe',
'-n0', 'tempfilename'))
```
which should take care of all escaping.
Workarounds:
- Double-quote, i.e. `editor=r'"C:/Program Files
(x86)/Notepad++/notepad++.exe"'`
- use 8.3 notation for parts with spaces, i.e.
`editor=r'C:/Progra~2/Notepad++/notepad++.exe'`
TASK DETAIL
https://phabricator.wikimedia.org/T86481
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign
<username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: valhallasw
Cc: Aklapper, valhallasw, jayvdb, pywikipedia-bugs