Skip to content

Commit d5a2710

Browse files
committed
Fix a compile warning in backup.c (#288)
1 parent 044abc1 commit d5a2710

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

backup.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1740,7 +1740,8 @@ delete_old_files(const char *root,
17401740
for (j = parray_num(files) - 1; j >= 0; j--)
17411741
{
17421742
pgFile *file2 = (pgFile *)parray_get(files, j);
1743-
if (strstr(file2->path, file->path) == file2->path)
1743+
if (file->path[0] != '\0' && file2->path[0] != '\0' &&
1744+
strstr(file2->path, file->path) == file2->path)
17441745
{
17451746
file2 = (pgFile *)parray_remove(files, j);
17461747
elog(INFO, "delete \"%s\"",

0 commit comments

Comments
 (0)