1
0
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:
Anastasia 2017-06-08 16:11:53 +03:00
parent e291e53b4a
commit 555fb1da82

View File

@ -241,7 +241,10 @@ assign_option(pgut_option *opt, const char *optarg, pgut_optsrc src)
if (orig_source != SOURCE_DEFAULT)
free(*(char **) opt->var);
*(char **) opt->var = pgut_strdup(optarg);
return;
if (strcmp(optarg,"") != 0)
return;
message = "a valid string. But provided: ";
break;
case 't':
if (parse_time(optarg, opt->var))
return;