1
0
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:
David Steele 2019-08-22 10:18:34 -04:00
parent c002a2ce2f
commit f88012cef3

View File

@ -286,7 +286,7 @@ sub list
# Attempt to open the path
if (opendir($hPath, $strPath))
{
@stryFileList = grep(!/^(\.)|(\.\.)$/i, readdir($hPath));
@stryFileList = grep(!/^(\.|\.\.)$/m, readdir($hPath));
close($hPath);
}
# Else process errors