1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2024-11-28 09:33:54 +02:00

check file format in dir_list_file

This commit is contained in:
Anastasia 2017-04-21 11:41:20 +03:00
parent dc50ba791a
commit a2bcbc77bd

8
dir.c
View File

@ -354,7 +354,13 @@ dir_list_file_internal(parray *files, const char *root, bool exclude,
/* skip if the file is in black_list defined by user */
if (black_list && parray_bsearch(black_list, root, BlackListCompare))
{
/* found in black_list. skip this item */
elog(LOG, "Skip file \"%s\": file is in the user's black list", file->path);
return;
}
if (!S_ISDIR(file->mode) && !S_ISLNK(file->mode) && !S_ISREG(file->mode))
{
elog(WARNING, "Skip file \"%s\": Unexpected file format", file->path);
return;
}