Make sure to quote empty strings
This commit is contained in:
parent
3624636c2f
commit
4ab0db3c04
2
sdn.cpp
2
sdn.cpp
|
@ -114,7 +114,7 @@ fun needs_shell_quoting (const string &v) -> bool {
|
||||||
for (auto c : v)
|
for (auto c : v)
|
||||||
if (strchr ("|&;<>()$`\\\"' \t\n" "*?[#˜=%" "!", c))
|
if (strchr ("|&;<>()$`\\\"' \t\n" "*?[#˜=%" "!", c))
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return v.empty ();
|
||||||
}
|
}
|
||||||
|
|
||||||
fun shell_escape (const string &v) -> string {
|
fun shell_escape (const string &v) -> string {
|
||||||
|
|
Loading…
Reference in New Issue