mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-29 11:26:48 -05:00
Quote empty arguments in Windows command line generation
This commit is contained in:
parent
b8d3260cb6
commit
192bdcd33b
2 changed files with 6 additions and 0 deletions
|
|
@ -42,6 +42,9 @@ static int build_spindown_argv(int argc, char* argv[], char* spindown_argv[5])
|
||||||
|
|
||||||
static int needs_quote(const WCHAR* arg)
|
static int needs_quote(const WCHAR* arg)
|
||||||
{
|
{
|
||||||
|
if (*arg == 0)
|
||||||
|
return 1;
|
||||||
|
|
||||||
while (*arg) {
|
while (*arg) {
|
||||||
if (*arg == L' ' || *arg == L'\t' || *arg == L'"')
|
if (*arg == L' ' || *arg == L'\t' || *arg == L'"')
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
||||||
|
|
@ -2493,6 +2493,9 @@ int windows_join(thread_id_t thread, void** retval)
|
||||||
|
|
||||||
static int needs_quote(const WCHAR* arg)
|
static int needs_quote(const WCHAR* arg)
|
||||||
{
|
{
|
||||||
|
if (*arg == 0)
|
||||||
|
return 1;
|
||||||
|
|
||||||
while (*arg) {
|
while (*arg) {
|
||||||
if (*arg == L' ' || *arg == L'\t' || *arg == L'"')
|
if (*arg == L' ' || *arg == L'\t' || *arg == L'"')
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue