1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-01-18 04:58:51 +02:00

Fixed wait_for_file() so that it will not error if the path does not yet exist.

This commit is contained in:
David Steele 2015-01-28 00:26:20 -05:00
parent a59bd8c328
commit b98b2df9f8

View File

@ -253,15 +253,15 @@ sub wait_for_file
while ($lTime > time() - $iSeconds)
{
opendir $hDir, $strDir
or confess &log(ERROR, "Could not open path ${strDir}: $!\n");
my @stryFile = grep(/$strRegEx/i, readdir $hDir);
close $hDir;
if (scalar @stryFile == 1)
if (opendir($hDir, $strDir))
{
return;
my @stryFile = grep(/$strRegEx/i, readdir $hDir);
close $hDir;
if (scalar @stryFile == 1)
{
return;
}
}
hsleep(.1);