mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2024-11-28 09:33:54 +02:00
add check that string options are not provided with empty strings
This commit is contained in:
parent
e291e53b4a
commit
555fb1da82
@ -241,7 +241,10 @@ assign_option(pgut_option *opt, const char *optarg, pgut_optsrc src)
|
|||||||
if (orig_source != SOURCE_DEFAULT)
|
if (orig_source != SOURCE_DEFAULT)
|
||||||
free(*(char **) opt->var);
|
free(*(char **) opt->var);
|
||||||
*(char **) opt->var = pgut_strdup(optarg);
|
*(char **) opt->var = pgut_strdup(optarg);
|
||||||
return;
|
if (strcmp(optarg,"") != 0)
|
||||||
|
return;
|
||||||
|
message = "a valid string. But provided: ";
|
||||||
|
break;
|
||||||
case 't':
|
case 't':
|
||||||
if (parse_time(optarg, opt->var))
|
if (parse_time(optarg, opt->var))
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user