1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-09 00:45:49 +02:00

Fix issues when a path option is / terminated.

This condition was not being properly checked for in the C code and it caused problems in the info command, at the very least.

Instead of applying a local fix, introduce a new path option type that will rigorously check the format of any incoming paths.

Reported by Marc Cousin.
This commit is contained in:
David Steele
2019-03-14 13:48:33 +04:00
parent b8ebea6b1c
commit 9382283586
13 changed files with 124 additions and 27 deletions

View File

@ -25,7 +25,7 @@ testRun(void)
{
StringList *argList = strLstNew();
strLstAddZ(argList, "pgbackrest");
strLstAdd(argList, strNewFmt("--repo-path=%s", strPtr(repoPath)));
strLstAdd(argList, strNewFmt("--repo-path=%s/", strPtr(repoPath)));
strLstAddZ(argList, "info");
StringList *argListText = strLstDup(argList);