Really fix shell quoting, quoting single quotes correctly.
This commit is contained in:
parent
6e2433aa00
commit
b8d2d81d00
|
@ -270,8 +270,9 @@ def tmpfile (dir=None, prefix="temp", suffix=None):
|
||||||
|
|
||||||
|
|
||||||
def shell_quote (value):
|
def shell_quote (value):
|
||||||
"""Quote all shell metacharacters in given string value."""
|
"""Quote all shell metacharacters in given string value with strong
|
||||||
return "'%s'" % value.replace("'", r"\'")
|
(ie. single) quotes, handling the single quote especially."""
|
||||||
|
return "'%s'" % value.replace("'", r"'\''")
|
||||||
|
|
||||||
|
|
||||||
def stripext (filename):
|
def stripext (filename):
|
||||||
|
|
Loading…
Reference in New Issue