mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-14 10:13:05 +02:00
Fix regexp to ignore ./.. directories in the Posix driver.
In versions <= 2.15 the old regexp caused any file or directory beginning with . to be ignored during a backup. This has caused behavioral differences in 2.16 because the new C code correctly excludes ./.. directories. This Perl code is only used for testing now, but it should still match the output of the C functions.
This commit is contained in:
parent
c002a2ce2f
commit
f88012cef3
@ -286,7 +286,7 @@ sub list
|
|||||||
# Attempt to open the path
|
# Attempt to open the path
|
||||||
if (opendir($hPath, $strPath))
|
if (opendir($hPath, $strPath))
|
||||||
{
|
{
|
||||||
@stryFileList = grep(!/^(\.)|(\.\.)$/i, readdir($hPath));
|
@stryFileList = grep(!/^(\.|\.\.)$/m, readdir($hPath));
|
||||||
close($hPath);
|
close($hPath);
|
||||||
}
|
}
|
||||||
# Else process errors
|
# Else process errors
|
||||||
|
Loading…
Reference in New Issue
Block a user