Skip to content
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.

Asterix passed as parameter to python extension scripts on Windows #387

Closed
hugbug opened this issue Jun 7, 2017 · 0 comments
Closed

Asterix passed as parameter to python extension scripts on Windows #387

hugbug opened this issue Jun 7, 2017 · 0 comments
Labels
Milestone

Comments

@hugbug
Copy link
Member

hugbug commented Jun 7, 2017

When executing extension scripts on Windows NZBGet finds an associated interpreter (python.exe in a case of python scripts) in registry. The registry entry looks like this:

Computer\HKEY_CLASSES_ROOT\Python.File\shell\open\command
"C:\Python27\python.exe" "%1" %*

NZBGet replaces %1 with the path to extension script. Here %* is supposed to expand to parameters passed to the script. NZBGet passes everything via environment variables and doesn't use command line parameters. However there is a bug that the asterix isn't removed and passed to the script as parameter.

That's not a a big issue because NZBGet scripts don't expect any parameters and usually do not check passed parameters. However for scripts which can be run not only in NZBGet context but also executed directly via command line that extra asterix can be problematic. See caronc/nzb-subliminal#27.

In this issue: remove asterix at the end of command line.

@hugbug hugbug added the bug label Jun 7, 2017
@hugbug hugbug added this to the v19 milestone Jun 7, 2017
@hugbug hugbug closed this as completed in 0a73a0c Jun 7, 2017
@hugbug hugbug changed the title Asterix passed a parameter to python extension scripts on Windows Asterix passed as parameter to python extension scripts on Windows Jun 7, 2017
hugbug added a commit that referenced this issue Oct 9, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant