1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-01-30 05:39:12 +02:00

Silence chmod warning of empty path when removing unit test data.

This commit is contained in:
David Steele 2021-02-19 07:24:59 -05:00
parent 3837e61a75
commit c4243331de

View File

@ -170,8 +170,8 @@ testBegin(const char *name)
// Clear out the test directory so the next test starts clean
char buffer[2048];
snprintf(
buffer, sizeof(buffer), "%schmod -R 700 %s/" "*;%srm -rf %s/" "*", testContainer() ? "sudo " : "", testPath(),
testContainer() ? "sudo " : "", testPath());
buffer, sizeof(buffer), "%schmod -R 700 %s/" "* > /dev/null 2>&1;%srm -rf %s/" "*", testContainer() ? "sudo " : "",
testPath(), testContainer() ? "sudo " : "", testPath());
if (system(buffer) != 0)
{
@ -182,7 +182,7 @@ testBegin(const char *name)
// Clear out the data directory so the next test starts clean
snprintf(
buffer, sizeof(buffer), "%schmod -R 700 %s/" "*;%srm -rf %s/" "*", testContainer() ? "sudo " : "",
buffer, sizeof(buffer), "%schmod -R 700 %s/" "* > /dev/null 2>&1;%srm -rf %s/" "*", testContainer() ? "sudo " : "",
testDataPath(), testContainer() ? "sudo " : "", testDataPath());
if (system(buffer) != 0)