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:
parent
a59bd8c328
commit
b98b2df9f8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user